Skip to main content

cdns

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

Overview​

Namecdns
TypeResource
Idovh.cdn_dedicated.cdns

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
anycaststring (ipv4)IPv4 address (e.g., 192.0.2.0) (example: 192.0.2.0)
backend_limitinteger (wire: backendLimit)
backend_useinteger (wire: backendUse)
cache_rule_limit_per_domaininteger (wire: cacheRuleLimitPerDomain)
iamobjectIAM resource metadata
last_quota_orderstring (date-time) (wire: lastQuotaOrder)
log_urlstringURL for downloading daily log of your CDN (wire: logUrl)
offerstring
quotainteger
servicestringThe internal name of your CDN offer

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_nameGet a CDN service
listselectiam_tags, x_pagination_modeList CDN services
change_contactexecserviceNameChange service contacts. Starts a procedure to change the admin, tech or billing contact of the service.
log_urlexecserviceName, kindGenerates a temporary URL to read the logs of one kind. The URL expires.
logsexecserviceNameGenerate a real time logs URL (Beta version)

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"}})
serviceNamestringThe internal name of your CDN offer
service_namestringThe internal name of your CDN offer (wire: serviceName)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a CDN service

SELECT
anycast,
backend_limit,
backend_use,
cache_rule_limit_per_domain,
iam,
last_quota_order,
log_url,
offer,
quota,
service
FROM ovh.cdn_dedicated.cdns
WHERE service_name = '{{ service_name }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.

EXEC ovh.cdn_dedicated.cdns.change_contact
@serviceName='{{ serviceName }}' --required
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;