zones
Creates, updates, deletes, gets or lists a zones resource.
Overview​
| Name | zones |
| Type | Resource |
| Id | ovh.domain.zones |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Zone name |
dnssec_activated | boolean | Is DNSSEC activated for this zone (wire: dnssecActivated) |
dnssec_supported | boolean | Is DNSSEC supported by this zone (wire: dnssecSupported) |
has_dns_anycast | boolean | Whether the DNS zone has a DNS Anycast subscription (wire: hasDnsAnycast) |
iam | object | IAM resource metadata |
last_update | string (date-time) | Last update date of the DNS zone (wire: lastUpdate) |
name_servers | array | Name servers that host the DNS zone (wire: nameServers) |
DNS zone
| Name | Datatype | Description |
|---|---|---|
name | string | Zone name |
dnssec_activated | boolean | Is DNSSEC activated for this zone (wire: dnssecActivated) |
dnssec_supported | boolean | Is DNSSEC supported by this zone (wire: dnssecSupported) |
has_dns_anycast | boolean | Whether the DNS zone has a DNS Anycast subscription (wire: hasDnsAnycast) |
iam | object | IAM resource metadata |
last_update | string (date-time) | Last update date of the DNS zone (wire: lastUpdate) |
name_servers | array | Name servers that host the DNS zone (wire: nameServers) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | zone_name | Returns a DNS zone: name servers, last update date, and whether DNSSEC and DNS Anycast are active. | |
list | select | iam_tags, x_pagination_mode | Returns the names of the DNS zones. | |
change_contact | exec | zoneName | Starts the change of the admin, tech or billing contact and returns the request IDs. | |
confirm_termination | exec | zoneName, token | Confirms the termination with the token sent by email. The reason and comments are optional. | |
import | exec | zoneName, zoneFile | Imports a zone file into the zone and returns the task. | |
refresh | exec | zoneName | Applies the pending record changes to the zone. | |
reset | exec | zoneName | Resets the zone, optionally with the records to set afterward. With minimized, only the mandatory records are created. | |
terminate | exec | zoneName | Emails 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.
| 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"}}) |
zoneName | string | Zone name |
zone_name | string | Zone name (wire: zoneName) |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
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
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
;
Returns the names of the DNS zones.
SELECT
name,
dnssec_activated,
dnssec_supported,
has_dns_anycast,
iam,
last_update,
name_servers
FROM ovh.domain.zones
WHERE iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_contact
- confirm_termination
- import
- refresh
- reset
- terminate
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 }}"
}'
;
Confirms the termination with the token sent by email. The reason and comments are optional.
EXEC ovh.domain.zones.confirm_termination
@zoneName='{{ zoneName }}' --required
@@json=
'{
"commentary": "{{ commentary }}",
"commentaryFutureUse": "{{ commentaryFutureUse }}",
"commentaryReason": "{{ commentaryReason }}",
"futureUse": "{{ futureUse }}",
"reason": "{{ reason }}",
"token": "{{ token }}"
}'
;
Imports a zone file into the zone and returns the task.
EXEC ovh.domain.zones.import
@zoneName='{{ zoneName }}' --required
@@json=
'{
"zoneFile": "{{ zoneFile }}"
}'
;
Applies the pending record changes to the zone.
EXEC ovh.domain.zones.refresh
@zoneName='{{ zoneName }}' --required
;
Resets the zone, optionally with the records to set afterward. With minimized, only the mandatory records are created.
EXEC ovh.domain.zones.reset
@zoneName='{{ zoneName }}' --required
@@json=
'{
"DnsRecords": "{{ DnsRecords }}",
"minimized": {{ minimized }}
}'
;
Emails a termination token to the admin contact, to use with Confirm termination.
EXEC ovh.domain.zones.terminate
@zoneName='{{ zoneName }}' --required
;