Skip to main content

secondary_dns_domains

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

Overview​

Namesecondary_dns_domains
TypeResource
Idovh.vps.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)IPv4 address (e.g., 192.0.2.0) (example: 192.0.2.0) (wire: ipMaster)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain, service_nameReturns the domain, the target IP and the master IP of a secondary DNS domain of the VPS.
listselectservice_namex_pagination_modeReturns the domains configured on the secondary DNS of the VPS.
createinsertservice_name, domainAdds a domain to the secondary DNS of the VPS.
deletedeletedomain, service_nameRemoves a domain from the secondary DNS of the VPS.

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
service_namestringService name (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​

Returns the domain, the target IP and the master IP of a secondary DNS domain of the VPS.

SELECT
creation_date,
dns,
domain,
ip_master
FROM ovh.vps.secondary_dns_domains
WHERE domain = '{{ domain }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Adds a domain to the secondary DNS of the VPS.

INSERT INTO ovh.vps.secondary_dns_domains (
domain,
ip,
service_name
)
SELECT
'{{ domain }}' /* required */,
'{{ ip }}',
'{{ service_name }}'
;

DELETE examples​

Removes a domain from the secondary DNS of the VPS.

DELETE FROM ovh.vps.secondary_dns_domains
WHERE domain = '{{ domain }}' --required
AND service_name = '{{ service_name }}' --required
;