secondary_dns_domains
Creates, updates, deletes, gets or lists a secondary_dns_domains resource.
Overview​
| Name | secondary_dns_domains |
| Type | Resource |
| Id | ovh.dedicated_server.secondary_dns_domains |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
creation_date | string (date-time) | (wire: creationDate) |
dns | string | Secondary DNS server |
domain | string | Domain on slave server |
ip_master | string (ipv4) | Master IPv4 address (example: 192.0.2.0) (wire: ipMaster) |
Secondary DNS infos
| Name | Datatype | Description |
|---|---|---|
creation_date | string (date-time) | (wire: creationDate) |
dns | string | Secondary DNS server |
domain | string | Domain on slave server |
ip_master | string (ipv4) | Master IPv4 address (example: 192.0.2.0) (wire: ipMaster) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | domain, service_name | Get a secondary DNS domain. Returns the domain, the secondary DNS server that hosts it, its master IPv4 address and its creation date. | |
list | select | service_name | x_pagination_mode | List secondary DNS domains. Returns the names of the domains declared on the secondary DNS of the server. |
create | insert | service_name, domain | Create a secondary DNS domain. Adds a domain to the secondary DNS of the server, with its ip, which is required. The domain must first be verified with the TXT record given by secondaryDnsNameDomainToken. | |
update | update | domain, service_name | Update a secondary DNS domain. Updates the master IPv4 address targeted by the domain on the secondary DNS. It is the only field that can be changed. | |
delete | delete | domain, service_name | Delete a secondary DNS domain. Removes the domain from the secondary DNS of the server. The call returns no content. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
domain | string | Domain on slave server |
service_name | string | The internal name of your dedicated server (wire: serviceName) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a secondary DNS domain. Returns the domain, the secondary DNS server that hosts it, its master IPv4 address and its creation date.
SELECT
creation_date,
dns,
domain,
ip_master
FROM ovh.dedicated_server.secondary_dns_domains
WHERE domain = '{{ domain }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List secondary DNS domains. Returns the names of the domains declared on the secondary DNS of the server.
SELECT
creation_date,
dns,
domain,
ip_master
FROM ovh.dedicated_server.secondary_dns_domains
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a secondary DNS domain. Adds a domain to the secondary DNS of the server, with its ip, which is required. The domain must first be verified with the TXT record given by secondaryDnsNameDomainToken.
INSERT INTO ovh.dedicated_server.secondary_dns_domains (
domain,
ip,
service_name
)
SELECT
'{{ domain }}' /* required */,
'{{ ip }}',
'{{ service_name }}'
;
# Description fields are for documentation purposes
- name: secondary_dns_domains
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the secondary_dns_domains resource.
- name: domain
value: "{{ domain }}"
description: |
The domain to add
- name: ip
value: "{{ ip }}"
description: |
IPv4 address (e.g., 192.0.2.0)
UPDATE examples​
- update
Update a secondary DNS domain. Updates the master IPv4 address targeted by the domain on the secondary DNS. It is the only field that can be changed.
UPDATE ovh.dedicated_server.secondary_dns_domains
SET
ip_master = '{{ ip_master }}'
WHERE
domain = '{{ domain }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Delete a secondary DNS domain. Removes the domain from the secondary DNS of the server. The call returns no content.
DELETE FROM ovh.dedicated_server.secondary_dns_domains
WHERE domain = '{{ domain }}' --required
AND service_name = '{{ service_name }}' --required
;