secondary_dns_domains
Creates, updates, deletes, gets or lists a secondary_dns_domains resource.
Overview​
| Name | secondary_dns_domains |
| Type | Resource |
| Id | ovh.vps.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) | IPv4 address (e.g., 192.0.2.0) (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) | IPv4 address (e.g., 192.0.2.0) (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 | Returns the domain, the target IP and the master IP of a secondary DNS domain of the VPS. | |
list | select | service_name | x_pagination_mode | Returns the domains configured on the secondary DNS of the VPS. |
create | insert | service_name, domain | Adds a domain to the secondary DNS of the VPS. | |
delete | delete | domain, service_name | Removes 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.
| 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 |
service_name | string | Service name (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
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
;
Returns the domains configured on the secondary DNS of the VPS.
SELECT
creation_date,
dns,
domain,
ip_master
FROM ovh.vps.secondary_dns_domains
WHERE service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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 }}'
;
# 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)
DELETE examples​
- delete
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
;