attached_domains
Creates, updates, deletes, gets or lists an attached_domains resource.
Overview​
| Name | attached_domains |
| Type | Resource |
| Id | ovh.hosting_web.attached_domains |
Fields​
The following fields are returned by SELECT queries:
- get
- list_by_service_name
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
runtime_id | integer | The runtime configuration ID used on this domain (wire: runtimeId) |
task_id | integer | The task ID working on this domain (wire: taskId) |
capabilities | array | Provides the capabilities related to your attachedDomain |
cdn | string | whether or not attachedDomain is linked to the hosting cdn (active, none) |
domain | string | Domain linked (fqdn) |
firewall | string | Firewall state for this path (active, none) |
ip_location | string | IP location of the domain linked (BE, CA, CZ, DE, ES, FI, FR, IE, IT, LT, NL, PL, PT, UK) (wire: ipLocation) |
is_flushable | boolean | Whether your CDN can be flushed (wire: isFlushable) |
own_log | string | Domain for separate the logs (wire: ownLog) |
path | string | Attached domain path |
ssl | boolean | Put domain in SSL certificate |
status | string | Domain status (created, creating, deleting, updating) |
vcs_status | string | The status of the VCS synchronization (created, creating, deleting, deploying, disabled, error, initialError) (wire: vcsStatus) |
Public attached domain
| Name | Datatype | Description |
|---|---|---|
runtime_id | integer | The runtime configuration ID used on this domain (wire: runtimeId) |
task_id | integer | The task ID working on this domain (wire: taskId) |
capabilities | array | Provides the capabilities related to your attachedDomain |
cdn | string | whether or not attachedDomain is linked to the hosting cdn (active, none) |
domain | string | Domain linked (fqdn) |
firewall | string | Firewall state for this path (active, none) |
ip_location | string | IP location of the domain linked (BE, CA, CZ, DE, ES, FI, FR, IE, IT, LT, NL, PL, PT, UK) (wire: ipLocation) |
is_flushable | boolean | Whether your CDN can be flushed (wire: isFlushable) |
own_log | string | Domain for separate the logs (wire: ownLog) |
path | string | Attached domain path |
ssl | boolean | Put domain in SSL certificate |
status | string | Domain status (created, creating, deleting, updating) |
vcs_status | string | The status of the VCS synchronization (created, creating, deleting, deploying, disabled, error, initialError) (wire: vcsStatus) |
| Name | Datatype | Description |
|---|---|---|
value | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | domain, service_name | Returns the path, CDN, firewall, SSL, IP location and status of the attached domain. | |
list_by_service_name | select | service_name | domain, path, x_pagination_mode | Returns the domains and subdomains attached to the hosting. Filter them by domain or path. |
list | select | domain | Returns the service names of the hostings that have the given domain attached. | |
create | insert | service_name | Attaches a domain to a folder of the hosting, with its CDN, firewall, SSL and IP location settings, and returns the task. Set bypassDNSConfiguration to true to leave the DNS zone unchanged. | |
update | update | domain, service_name | Updates the path, CDN, firewall, SSL, IP location or log domain of the attached domain. | |
delete | delete | domain, service_name | bypass_dns_configuration | Detaches the domain from the hosting and returns the task. Set bypassDNSConfiguration to true to leave the DNS zone unchanged. |
purge_cache | exec | domain, serviceName | Purge the attached domain cache. Purges the CDN cache of the attached domain and returns the task. Available when isFlushable is true on the attached domain. | |
restart | exec | domain, serviceName | Restart the attached domain virtual host. Restarts the virtual host serving the attached domain and returns the task. |
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 linked (fqdn) |
serviceName | string | The internal name of your hosting |
service_name | string | Service name (wire: serviceName) |
bypass_dns_configuration | boolean | If set to true, DNS zone will not be updated by the operation (wire: bypassDNSConfiguration) |
domain | string | Filter the value of domain property (like) |
path | string | Filter the value of path property (like) |
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_by_service_name
- list
Returns the path, CDN, firewall, SSL, IP location and status of the attached domain.
SELECT
runtime_id,
task_id,
capabilities,
cdn,
domain,
firewall,
ip_location,
is_flushable,
own_log,
path,
ssl,
status,
vcs_status
FROM ovh.hosting_web.attached_domains
WHERE domain = '{{ domain }}' -- required
AND service_name = '{{ service_name }}' -- required
;
Returns the domains and subdomains attached to the hosting. Filter them by domain or path.
SELECT
runtime_id,
task_id,
capabilities,
cdn,
domain,
firewall,
ip_location,
is_flushable,
own_log,
path,
ssl,
status,
vcs_status
FROM ovh.hosting_web.attached_domains
WHERE service_name = '{{ service_name }}' -- required
AND domain = '{{ domain }}'
AND path = '{{ path }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Returns the service names of the hostings that have the given domain attached.
SELECT
value
FROM ovh.hosting_web.attached_domains
WHERE domain = '{{ domain }}' -- required
;
INSERT examples​
- create
- Manifest
Attaches a domain to a folder of the hosting, with its CDN, firewall, SSL and IP location settings, and returns the task. Set bypassDNSConfiguration to true to leave the DNS zone unchanged.
INSERT INTO ovh.hosting_web.attached_domains (
bypass_dns_configuration,
cdn,
domain,
firewall,
ip_location,
own_log,
path,
runtime_id,
ssl,
service_name
)
SELECT
{{ bypass_dns_configuration }},
'{{ cdn }}',
'{{ domain }}',
'{{ firewall }}',
'{{ ip_location }}',
'{{ own_log }}',
'{{ path }}',
{{ runtime_id }},
{{ ssl }},
'{{ service_name }}'
RETURNING
id,
object_id,
done_date,
function,
last_update,
object_type,
start_date,
status
;
# Description fields are for documentation purposes
- name: attached_domains
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the attached_domains resource.
- name: bypass_dns_configuration
value: {{ bypass_dns_configuration }}
description: |
If set to true, DNS zone will not be updated by the operation
- name: cdn
value: "{{ cdn }}"
description: |
Whether the attached domain is linked to the hosting CDN
valid_values: ['active', 'none']
- name: domain
value: "{{ domain }}"
description: |
Domain to link
- name: firewall
value: "{{ firewall }}"
description: |
Whether the firewall is active for this domain
valid_values: ['active', 'none']
- name: ip_location
value: "{{ ip_location }}"
description: |
Change attached domain's DNS to the IP of the country
valid_values: ['BE', 'CA', 'CZ', 'DE', 'ES', 'FI', 'FR', 'IE', 'IT', 'LT', 'NL', 'PL', 'PT', 'UK']
- name: own_log
value: "{{ own_log }}"
description: |
Domain to separate the logs on
- name: path
value: "{{ path }}"
description: |
Path of the attached domain
- name: runtime_id
value: {{ runtime_id }}
description: |
The runtime configuration ID used on this domain
- name: ssl
value: {{ ssl }}
description: |
Whether to put the attached domain in the SSL certificate
UPDATE examples​
- update
Updates the path, CDN, firewall, SSL, IP location or log domain of the attached domain.
UPDATE ovh.hosting_web.attached_domains
SET
bypass_dns_configuration = {{ bypass_dns_configuration }},
cdn = '{{ cdn }}',
domain = '{{ domain }}',
firewall = '{{ firewall }}',
ip_location = '{{ ip_location }}',
own_log = '{{ own_log }}',
path = '{{ path }}',
runtime_id = {{ runtime_id }},
ssl = {{ ssl }}
WHERE
domain = '{{ domain }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Detaches the domain from the hosting and returns the task. Set bypassDNSConfiguration to true to leave the DNS zone unchanged.
DELETE FROM ovh.hosting_web.attached_domains
WHERE domain = '{{ domain }}' --required
AND service_name = '{{ service_name }}' --required
AND bypass_dns_configuration = '{{ bypass_dns_configuration }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- purge_cache
- restart
Purge the attached domain cache. Purges the CDN cache of the attached domain and returns the task. Available when isFlushable is true on the attached domain.
EXEC ovh.hosting_web.attached_domains.purge_cache
@domain='{{ domain }}' --required,
@serviceName='{{ serviceName }}' --required
;
Restart the attached domain virtual host. Restarts the virtual host serving the attached domain and returns the task.
EXEC ovh.hosting_web.attached_domains.restart
@domain='{{ domain }}' --required,
@serviceName='{{ serviceName }}' --required
;