cdn_domains
Creates, updates, deletes, gets or lists a cdn_domains resource.
Overview​
| Name | cdn_domains |
| Type | Resource |
| Id | ovh.hosting_web.cdn_domains |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Domain name |
creation_date | string (date-time) | Creation date (wire: creationDate) |
need_refresh | boolean | The domain configuration has been updated, it needs a refresh (wire: needRefresh) |
status | string | Domain status (deleting, disabled, disabling, ok, refreshing, to_delete, to_disable, to_refresh) |
updated_date | string (date-time) | Last update date (wire: updatedDate) |
Domain details
| Name | Datatype | Description |
|---|---|---|
name | string | Domain name |
creation_date | string (date-time) | Creation date (wire: creationDate) |
need_refresh | boolean | The domain configuration has been updated, it needs a refresh (wire: needRefresh) |
status | string | Domain status (deleting, disabled, disabling, ok, refreshing, to_delete, to_disable, to_refresh) |
updated_date | string (date-time) | Last update date (wire: updatedDate) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | domain_name, service_name | Get details for a domain on a Shared CDN service | |
list | select | service_name | List all domains for a Shared CDN service | |
purge | exec | domainName, serviceName | pattern, patternType | Flush cache content on CDN for a domain |
refresh | exec | domainName, serviceName | Trigger a refresh for a domain |
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"}}) |
domainName | string | Domain name |
domain_name | string | Domain name (wire: domainName) |
serviceName | string | Service name |
service_name | string | Service name (wire: serviceName) |
pattern | string | Purge pattern |
patternType | string | Purge Pattern Type (default is regex) |
SELECT examples​
- get
- list
Get details for a domain on a Shared CDN service
SELECT
name,
creation_date,
need_refresh,
status,
updated_date
FROM ovh.hosting_web.cdn_domains
WHERE domain_name = '{{ domain_name }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List all domains for a Shared CDN service
SELECT
name,
creation_date,
need_refresh,
status,
updated_date
FROM ovh.hosting_web.cdn_domains
WHERE service_name = '{{ service_name }}' -- required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- purge
- refresh
Flush cache content on CDN for a domain
EXEC ovh.hosting_web.cdn_domains.purge
@domainName='{{ domainName }}' --required,
@serviceName='{{ serviceName }}' --required,
@pattern='{{ pattern }}',
@patternType='{{ patternType }}'
;
Trigger a refresh for a domain
EXEC ovh.hosting_web.cdn_domains.refresh
@domainName='{{ domainName }}' --required,
@serviceName='{{ serviceName }}' --required
;