Cloud CDN API, REST: Resource methods
Provider's resources management service.
JSON Representation
{
"id": "string",
"folderId": "string",
"cname": "string",
"createdAt": "string",
"updatedAt": "string",
"active": true,
"options": {
"disableCache": {
"enabled": true,
"value": true
},
"edgeCacheSettings": {
"enabled": true,
// `options.edgeCacheSettings` includes only one of the fields `value`, `defaultValue`
"value": {
"simpleValue": "string",
"customValues": "object"
},
"defaultValue": "string",
// end of the list of possible fields`options.edgeCacheSettings`
},
"browserCacheSettings": {
"enabled": true,
"value": "string"
},
"cacheHttpHeaders": {
"enabled": true,
"value": [
"string"
]
},
"queryParamsOptions": {
// `options.queryParamsOptions` includes only one of the fields `ignoreQueryString`, `queryParamsWhitelist`, `queryParamsBlacklist`
"ignoreQueryString": {
"enabled": true,
"value": true
},
"queryParamsWhitelist": {
"enabled": true,
"value": [
"string"
]
},
"queryParamsBlacklist": {
"enabled": true,
"value": [
"string"
]
},
// end of the list of possible fields`options.queryParamsOptions`
},
"slice": {
"enabled": true,
"value": true
},
"compressionOptions": {
// `options.compressionOptions` includes only one of the fields `fetchCompressed`, `gzipOn`, `brotliCompression`
"fetchCompressed": {
"enabled": true,
"value": true
},
"gzipOn": {
"enabled": true,
"value": true
},
"brotliCompression": {
"enabled": true,
"value": [
"string"
]
},
// end of the list of possible fields`options.compressionOptions`
},
"redirectOptions": {
// `options.redirectOptions` includes only one of the fields `redirectHttpToHttps`, `redirectHttpsToHttp`
"redirectHttpToHttps": {
"enabled": true,
"value": true
},
"redirectHttpsToHttp": {
"enabled": true,
"value": true
},
// end of the list of possible fields`options.redirectOptions`
},
"hostOptions": {
// `options.hostOptions` includes only one of the fields `host`, `forwardHostHeader`
"host": {
"enabled": true,
"value": "string"
},
"forwardHostHeader": {
"enabled": true,
"value": true
},
// end of the list of possible fields`options.hostOptions`
},
"staticHeaders": {
"enabled": true,
"value": "object"
},
"cors": {
"enabled": true,
"value": [
"string"
]
},
"stale": {
"enabled": true,
"value": [
"string"
]
},
"allowedHttpMethods": {
"enabled": true,
"value": [
"string"
]
},
"proxyCacheMethodsSet": {
"enabled": true,
"value": true
},
"disableProxyForceRanges": {
"enabled": true,
"value": true
},
"staticRequestHeaders": {
"enabled": true,
"value": "object"
},
"customServerName": {
"enabled": true,
"value": "string"
},
"ignoreCookie": {
"enabled": true,
"value": true
},
"rewrite": {
"enabled": true,
"body": "string",
"flag": "string"
},
"secureKey": {
"enabled": true,
"key": "string",
"type": "string"
},
"ipAddressAcl": {
"enabled": true,
"policyType": "string",
"exceptedValues": [
"string"
]
}
},
"secondaryHostnames": [
"string"
],
"originGroupId": "string",
"originGroupName": "string",
"originProtocol": "string",
"sslCertificate": {
"type": "string",
"status": "string",
"data": {
"cm": {
"id": "string"
}
}
},
"labels": "object"
}
Field | Description |
---|---|
id | string ID of the resource. |
folderId | string Folder id. |
cname | string CDN endpoint CNAME, must be unique among resources. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
updatedAt | string (date-time) Update timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
active | boolean (boolean) Flag to create Resource either in active or disabled state. True - the content from CDN is available to clients. False - the content from CDN isn't available to clients. |
options | object Resource settings and options to tune CDN edge behavior. A major set of various resource options. |
options. disableCache |
object Set up a cache status. Set up bool values. |
options. disableCache. enabled |
boolean (boolean) True - the option is enabled and its |
options. disableCache. value |
boolean (boolean) Value of the option. |
options. edgeCacheSettings |
object Set up A set of the edge cache parameters. |
options. edgeCacheSettings. enabled |
boolean (boolean) True - the option is enabled and its |
options. edgeCacheSettings. value |
object options.edgeCacheSettings includes only one of the fields value , defaultValue A set of the caching response time parameters. |
options. edgeCacheSettings. value. simpleValue |
string (int64) Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use |
options. edgeCacheSettings. value. customValues |
object Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ( |
options. edgeCacheSettings. defaultValue |
string (int64) options.edgeCacheSettings includes only one of the fields value , defaultValue Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached. |
options. browserCacheSettings |
object Using A set of the numeric parameters. |
options. browserCacheSettings. enabled |
boolean (boolean) True - the option is enabled and its |
options. browserCacheSettings. value |
string (int64) Value of the option. |
options. cacheHttpHeaders |
object List HTTP headers that must be included in responses to clients. A set of the string list parameters. |
options. cacheHttpHeaders. enabled |
boolean (boolean) True - the option is enabled and its |
options. cacheHttpHeaders. value[] |
string Value of the option. |
options. queryParamsOptions |
object Set up A set of the query parameters. |
options. queryParamsOptions. ignoreQueryString |
object options.queryParamsOptions includes only one of the fields ignoreQueryString , queryParamsWhitelist , queryParamsBlacklist Set up bool values. |
options. queryParamsOptions. ignoreQueryString. enabled |
boolean (boolean) True - the option is enabled and its |
options. queryParamsOptions. ignoreQueryString. value |
boolean (boolean) Value of the option. |
options. queryParamsOptions. queryParamsWhitelist |
object options.queryParamsOptions includes only one of the fields ignoreQueryString , queryParamsWhitelist , queryParamsBlacklist A set of the string list parameters. |
options. queryParamsOptions. queryParamsWhitelist. enabled |
boolean (boolean) True - the option is enabled and its |
options. queryParamsOptions. queryParamsWhitelist. value[] |
string Value of the option. |
options. queryParamsOptions. queryParamsBlacklist |
object Ignore All Except. Files with the specified query parameters are cached as objects with different keys, files with other parameters are cached as objects with the same key. options.queryParamsOptions includes only one of the fields ignoreQueryString , queryParamsWhitelist , queryParamsBlacklist |
options. queryParamsOptions. queryParamsBlacklist. enabled |
boolean (boolean) True - the option is enabled and its |
options. queryParamsOptions. queryParamsBlacklist. value[] |
string Value of the option. |
options. slice |
object Files larger than 10 MB will be requested and cached in parts (no larger than 10 MB each part). It reduces time to first byte. The origin must support HTTP Range requests. By default the option is disabled. Set up bool values. |
options. slice. enabled |
boolean (boolean) True - the option is enabled and its |
options. slice. value |
boolean (boolean) Value of the option. |
options. compressionOptions |
object Set up compression variant. A set of the compression variant parameters. |
options. compressionOptions. fetchCompressed |
object Using ResourceOptionsBoolOption . Selected by default. Files with different query parameters are cached as objects with the same key regardless of the parameter value. options.compressionOptions includes only one of the fields fetchCompressed , gzipOn , brotliCompression |
options. compressionOptions. fetchCompressed. enabled |
boolean (boolean) True - the option is enabled and its |
options. compressionOptions. fetchCompressed. value |
boolean (boolean) Value of the option. |
options. compressionOptions. gzipOn |
object The Fetch compressed option helps you to reduce the bandwidth between origin and CDN servers. Also, content delivery speed becomes higher because of reducing the time for compressing files in a CDN. options.compressionOptions includes only one of the fields fetchCompressed , gzipOn , brotliCompression |
options. compressionOptions. gzipOn. enabled |
boolean (boolean) True - the option is enabled and its |
options. compressionOptions. gzipOn. value |
boolean (boolean) Value of the option. |
options. compressionOptions. brotliCompression |
object Ignore only. Files with the specified query parameters are cached as objects with the same key, files with other parameters are cached as objects with different keys. options.compressionOptions includes only one of the fields fetchCompressed , gzipOn , brotliCompression |
options. compressionOptions. brotliCompression. enabled |
boolean (boolean) True - the option is enabled and its |
options. compressionOptions. brotliCompression. value[] |
string Value of the option. |
options. redirectOptions |
object Set up redirects. A set of the redirect parameters. |
options. redirectOptions. redirectHttpToHttps |
object Using ResourceOptionsBoolOption . GZip compression at CDN servers reduces file size by 70% and can be as high as 90%. options.redirectOptions includes only one of the fields redirectHttpToHttps , redirectHttpsToHttp |
options. redirectOptions. redirectHttpToHttps. enabled |
boolean (boolean) True - the option is enabled and its |
options. redirectOptions. redirectHttpToHttps. value |
boolean (boolean) Value of the option. |
options. redirectOptions. redirectHttpsToHttp |
object Using ResourceOptionsBoolOption . Set up a redirect from HTTPS to HTTP. options.redirectOptions includes only one of the fields redirectHttpToHttps , redirectHttpsToHttp |
options. redirectOptions. redirectHttpsToHttp. enabled |
boolean (boolean) True - the option is enabled and its |
options. redirectOptions. redirectHttpsToHttp. value |
boolean (boolean) Value of the option. |
options. hostOptions |
object Set up host parameters. A set of the host parameters. |
options. hostOptions. host |
object options.hostOptions includes only one of the fields host , forwardHostHeader A set of the string parameters. |
options. hostOptions. host. enabled |
boolean (boolean) True - the option is enabled and its |
options. hostOptions. host. value |
string Value of the option. |
options. hostOptions. forwardHostHeader |
object Using ResourceOptionsBoolOption . Set up a redirect from HTTP to HTTPS. options.hostOptions includes only one of the fields host , forwardHostHeader |
options. hostOptions. forwardHostHeader. enabled |
boolean (boolean) True - the option is enabled and its |
options. hostOptions. forwardHostHeader. value |
boolean (boolean) Value of the option. |
options. staticHeaders |
object Set up static headers that CDN servers send in responses to clients. A set of the strings map parameters. |
options. staticHeaders. enabled |
boolean (boolean) True - the option is enabled and its |
options. staticHeaders. value |
object Value of the option. |
options. cors |
object Parameter that lets browsers get access to selected resources from a domain different to a domain from which the request is received. Read more. A set of the string list parameters. |
options. cors. enabled |
boolean (boolean) True - the option is enabled and its |
options. cors. value[] |
string Value of the option. |
options. stale |
object List of errors which instruct CDN servers to serve stale content to clients. Possible values: A set of the string list parameters. |
options. stale. enabled |
boolean (boolean) True - the option is enabled and its |
options. stale. value[] |
string Value of the option. |
options. allowedHttpMethods |
object HTTP methods for your CDN content. By default the following methods are allowed: GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS. In case some methods are not allowed to the user, they will get the 405 (Method Not Allowed) response. If the method is not supported, the user gets the 501 (Not Implemented) response. A set of the string list parameters. |
options. allowedHttpMethods. enabled |
boolean (boolean) True - the option is enabled and its |
options. allowedHttpMethods. value[] |
string Value of the option. |
options. proxyCacheMethodsSet |
object Allows caching for GET, HEAD and POST requests. Set up bool values. |
options. proxyCacheMethodsSet. enabled |
boolean (boolean) True - the option is enabled and its |
options. proxyCacheMethodsSet. value |
boolean (boolean) Value of the option. |
options. disableProxyForceRanges |
object Disabling proxy force ranges. Set up bool values. |
options. disableProxyForceRanges. enabled |
boolean (boolean) True - the option is enabled and its |
options. disableProxyForceRanges. value |
boolean (boolean) Value of the option. |
options. staticRequestHeaders |
object Set up custom headers that CDN servers send in requests to origins. The Header name field can contain letters (A-Z, a-z), numbers (0-9), dashes (-) and underscores (). The Value field can contain letters (A-Z, a-z), numbers (0-9), dashes (-), underscores (), slashes (/), colons (:), equal (=), dots (.), and spaces. A set of the strings map parameters. |
options. staticRequestHeaders. enabled |
boolean (boolean) True - the option is enabled and its |
options. staticRequestHeaders. value |
object Value of the option. |
options. customServerName |
object Wildcard additional CNAME. If a resource has a wildcard additional CNAME, you can use your own certificate for content delivery via HTTPS. Read-only. A set of the string parameters. |
options. customServerName. enabled |
boolean (boolean) True - the option is enabled and its |
options. customServerName. value |
string Value of the option. |
options. ignoreCookie |
object Using Set up bool values. |
options. ignoreCookie. enabled |
boolean (boolean) True - the option is enabled and its |
options. ignoreCookie. value |
boolean (boolean) Value of the option. |
options. rewrite |
object Changing or redirecting query paths. An option for changing or redirecting query paths. |
options. rewrite. enabled |
boolean (boolean) True - the option is enabled and its |
options. rewrite. body |
string Pattern for rewrite. The value must have the following format: |
options. rewrite. flag |
string Break flag is applied to the option by default. It is not shown in the field. RewriteFlag defines flag for the Rewrite option.
|
options. secureKey |
object Secure token to protect contect and limit access by IP addresses and time limits. |
options. secureKey. enabled |
boolean (boolean) True - the option is enabled and its [flag] is applied to the resource. False - the option is disabled and its default value of the [flag] is used for the resource. |
options. secureKey. key |
string The key for the URL signing. |
options. secureKey. type |
string The type of the URL signing. The URL could be available for all IP addresses or for the only one IP. SecureKeyURLType defines type of the URL signing.
|
options. ipAddressAcl |
object Manage the state of the IP access policy option. The option controls access to content from the specified IP addresses. |
options. ipAddressAcl. enabled |
boolean (boolean) True - the option is enabled and its [flag] is applied to the resource. False - the option is disabled and its default value of the [flag] is used for the resource. |
options. ipAddressAcl. policyType |
string The policy type. One of allow or deny value. PolicyType defines type of the policy in IP address acl rules.
|
options. ipAddressAcl. exceptedValues[] |
string The list of IP addresses to be allowed or denied. |
secondaryHostnames[] | string List of secondary hostname strings. |
originGroupId | string (int64) ID of the origin group. |
originGroupName | string Name of the origin group. |
originProtocol | string Specify the protocol schema to be used in communication with origin. This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server.
|
sslCertificate | object SSL certificate options. A SSL certificate parameters. |
sslCertificate. type |
string Type of the certificate. A certificate type parameters.
|
sslCertificate. status |
string Active status. A certificate status parameters.
|
sslCertificate. data |
object Certificate data. A certificate data parameters. |
sslCertificate. data. cm |
object A certificate data custom parameters. |
sslCertificate. data. cm. id |
string ID of the custom certificate. |
labels | object Labels of the resource. |
Methods
Method | Description |
---|---|
create | Creates a CDN resource in the specified folder. |
delete | Deletes client's CDN resource. |
get | Get client's CDN resource by resource id. |
getProviderCName | Get Provider's CNAME (edge endpoint) bind to specified folder id. Returns UNIMPLEMENTED error, if provider doesn't support CNAME request. |
list | Lists CDN resources. |
update | Updates the specified CDN resource. |