Skip to main content

secondary_dns_domains

Creates, updates, deletes, gets or lists a secondary_dns_domains resource.

Overview​

Namesecondary_dns_domains
TypeResource
Idovh.dedicated_server.secondary_dns_domains

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
creation_datestring (date-time) (wire: creationDate)
dnsstringSecondary DNS server
domainstringDomain on slave server
ip_masterstring (ipv4)Master IPv4 address (example: 192.0.2.0) (wire: ipMaster)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain, service_nameGet a secondary DNS domain. Returns the domain, the secondary DNS server that hosts it, its master IPv4 address and its creation date.
listselectservice_namex_pagination_modeList secondary DNS domains. Returns the names of the domains declared on the secondary DNS of the server.
createinsertservice_name, domainCreate 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.
updateupdatedomain, service_nameUpdate 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.
deletedeletedomain, service_nameDelete 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.

NameDatatypeDescription
api_hoststringThe 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"}})
domainstringDomain on slave server
service_namestringThe internal name of your dedicated server (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

INSERT examples​

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 }}'
;

UPDATE examples​

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 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
;