Skip to main content

zones

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

Overview​

Namezones
TypeResource
Idovh.domain.zones

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringZone name
dnssec_activatedbooleanIs DNSSEC activated for this zone (wire: dnssecActivated)
dnssec_supportedbooleanIs DNSSEC supported by this zone (wire: dnssecSupported)
has_dns_anycastbooleanWhether the DNS zone has a DNS Anycast subscription (wire: hasDnsAnycast)
iamobjectIAM resource metadata
last_updatestring (date-time)Last update date of the DNS zone (wire: lastUpdate)
name_serversarrayName servers that host the DNS zone (wire: nameServers)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectzone_nameReturns a DNS zone: name servers, last update date, and whether DNSSEC and DNS Anycast are active.
listselectiam_tags, x_pagination_modeReturns the names of the DNS zones.
change_contactexeczoneNameStarts the change of the admin, tech or billing contact and returns the request IDs.
confirm_terminationexeczoneName, tokenConfirms the termination with the token sent by email. The reason and comments are optional.
importexeczoneName, zoneFileImports a zone file into the zone and returns the task.
refreshexeczoneNameApplies the pending record changes to the zone.
resetexeczoneNameResets the zone, optionally with the records to set afterward. With minimized, only the mandatory records are created.
terminateexeczoneNameEmails a termination token to the admin contact, to use with Confirm termination.

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"}})
zoneNamestringZone name
zone_namestringZone name (wire: zoneName)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
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 a DNS zone: name servers, last update date, and whether DNSSEC and DNS Anycast are active.

SELECT
name,
dnssec_activated,
dnssec_supported,
has_dns_anycast,
iam,
last_update,
name_servers
FROM ovh.domain.zones
WHERE zone_name = '{{ zone_name }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Starts the change of the admin, tech or billing contact and returns the request IDs.

EXEC ovh.domain.zones.change_contact
@zoneName='{{ zoneName }}' --required
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;