Skip to main content

cdn_domains

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

Overview​

Namecdn_domains
TypeResource
Idovh.hosting_web.cdn_domains

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringDomain name
creation_datestring (date-time)Creation date (wire: creationDate)
need_refreshbooleanThe domain configuration has been updated, it needs a refresh (wire: needRefresh)
statusstringDomain status (deleting, disabled, disabling, ok, refreshing, to_delete, to_disable, to_refresh)
updated_datestring (date-time)Last update date (wire: updatedDate)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain_name, service_nameGet details for a domain on a Shared CDN service
listselectservice_nameList all domains for a Shared CDN service
purgeexecdomainName, serviceNamepattern, patternTypeFlush cache content on CDN for a domain
refreshexecdomainName, serviceNameTrigger 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.

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"}})
domainNamestringDomain name
domain_namestringDomain name (wire: domainName)
serviceNamestringService name
service_namestringService name (wire: serviceName)
patternstringPurge pattern
patternTypestringPurge Pattern Type (default is regex)

SELECT examples​

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
;

Lifecycle Methods​

EXEC variables use wire (API) names.

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 }}'
;