Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Cloud CDN
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Resources
      • Creating a resource
      • Editing basic settings of a resource
      • Configuring resource caching
      • Configuring log export
      • Pre-loading files to CDN servers
      • Purging resource cache
      • Configuring request and response headers
      • Configuring CORS for responses to clients
      • Configuring HTTP methods
      • Enabling file compression
      • Enabling file segmentation
      • Enabling origin shielding
      • Disabling a resource
      • Deleting a resource
    • Origin groups
      • Creating an origin group
      • Editing an origin group
      • Connecting an origin group to a resource
      • Deleting an origin group
  • Practical guidelines
    • All practical guidelines
    • Publishing game updates
    • Integrating an L7 load balancer with the CDN and Object Storage
    • Blue-green and canary deployment of service versions
  • Concepts
    • Service overview
    • Resource
    • Origins and origin groups
    • Exchanging data between clients and the CDN
      • Overview
      • TLS certificates
      • CORS
      • Compressing content
    • Exchanging data between the CDN and origins
      • Overview
      • Host header
      • Content segmentation
      • Origin shielding
    • Caching content
    • Exporting logs
    • Quotas and limits
  • Access management
  • Troubleshooting
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • CacheService
      • OriginGroupService
      • OriginService
      • ProviderService
      • RawLogsService
      • ResourceService
      • OperationService
    • REST
      • Overview
      • Cache
        • Overview
        • prefetch
        • purge
      • OriginGroup
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • Origin
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • Provider
        • Overview
        • activate
        • listActivated
      • RawLogs
        • Overview
        • activate
        • deactivate
        • get
        • update
      • Resource
        • Overview
        • create
        • delete
        • get
        • getProviderCName
        • list
        • update
  • Pricing policy
  1. API reference
  2. REST
  3. Resource
  4. create

Cloud CDN API, REST: Resource.create

Written by
Yandex Cloud
  • HTTP request
  • Body parameters
  • Response

Creates a CDN resource in the specified folder.

Creation may take up to 15 minutes.

HTTP request

POST https://cdn.api.cloud.yandex.net/cdn/v1/resources

Body parameters

{
  "folderId": "string",
  "cname": "string",
  "origin": {

    // `origin` includes only one of the fields `originGroupId`, `originSource`, `originSourceParams`
    "originGroupId": "string",
    "originSource": "string",
    "originSourceParams": {
      "source": "string",
      "meta": {

        // `origin.originSourceParams.meta` includes only one of the fields `common`, `bucket`, `website`, `balancer`
        "common": {
          "name": "string"
        },
        "bucket": {
          "name": "string"
        },
        "website": {
          "name": "string"
        },
        "balancer": {
          "id": "string"
        },
        // end of the list of possible fields`origin.originSourceParams.meta`

      }
    },
    // end of the list of possible fields`origin`

  },
  "secondaryHostnames": {
    "values": [
      "string"
    ]
  },
  "originProtocol": "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"
    }
  },
  "sslCertificate": {
    "type": "string",
    "data": {
      "cm": {
        "id": "string"
      }
    }
  }
}
Field Description
folderId string

Required. ID of the to bind with new resource.

The maximum string length in characters is 50.

cname string

Required. CDN endpoint CNAME, must be unique among clients's resources.

origin object

Required. Specify the origins to be used for CDN resources requests.

origin.
originGroupId
string (int64)
origin includes only one of the fields originGroupId, originSource, originSourceParams

ID of pre-created origin group.

origin.
originSource
string
origin includes only one of the fields originGroupId, originSource, originSourceParams

Create new Origins group with single source, it's id will be returned in result.

origin.
originSourceParams
object
Set up resource origin parameters.
origin includes only one of the fields originGroupId, originSource, originSourceParams
origin.
originSourceParams.
source
string

Source of the content.

origin.
originSourceParams.
meta
object

Set up type of the origin.

Origin type. For details about the concept, see documentation.

origin.
originSourceParams.
meta.
common
object
An Object Storage bucket configured as a static site hosting.
origin.originSourceParams.meta includes only one of the fields common, bucket, website, balancer
origin.
originSourceParams.
meta.
common.
name
string

Name of the origin.

origin.
originSourceParams.
meta.
bucket
object
A server with a domain name linked to it
origin.originSourceParams.meta includes only one of the fields common, bucket, website, balancer
origin.
originSourceParams.
meta.
bucket.
name
string

Name of the origin.

origin.
originSourceParams.
meta.
website
object
An Object Storage bucket not configured as a static site hosting.
origin.originSourceParams.meta includes only one of the fields common, bucket, website, balancer
origin.
originSourceParams.
meta.
website.
name
string

Name of the origin.

origin.
originSourceParams.
meta.
balancer
object
An L7 load balancer from Application Load Balancer. CDN servers will access the load balancer at one of its IP addresses that must be selected in the origin settings.
origin.originSourceParams.meta includes only one of the fields common, bucket, website, balancer
origin.
originSourceParams.
meta.
balancer.
id
string

ID of the origin.

secondaryHostnames object

List of additional CNAMEs.

List of secondary (alternative) CNAMEs.

secondaryHostnames.
values[]
string

List of secondary hostname values.

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.

  • HTTP: CDN servers will connect to your origin via HTTP.
  • HTTPS: CDN servers will connect to your origin via HTTPS.
  • MATCH: Connection protocol will be chosen automatically (content on the origin source should be available for the CDN both through HTTP and HTTPS).
active boolean (boolean)

Flag to create Resource either in active or disabled state. In active state Origins payload could be transmitted from CDN CNAME requests. Default value: true

options object

Resource settings and options to tune CDN edge behavior. Most is unset.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

options.
disableCache.
value
boolean (boolean)

Value of the option.

options.
edgeCacheSettings
object

Set up ResourceOptionsEdgeCacheSettings.

A set of the edge cache parameters.

options.
edgeCacheSettings.
enabled
boolean (boolean)

True - the option is enabled and its values_variant is applied to the resource. False - the option is disabled and its default value is used for the resource.

options.
edgeCacheSettings.
value
object
Value of the option.
options.edgeCacheSettings includes only one of the fields value, defaultValue
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 0s disable to caching. Use customValues field to specify a custom caching time for a response with specific codes.

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 (304, 404 for example). Use any to specify caching time for all response codes. Caching time in seconds (0s, 600s for example). Use 0s to disable caching for a specific 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 ResourceOptionsInt64Option. Set up a cache period for the end-users browser. Content will be cached due to origin settings. If there are no cache settings on your origin, the content will not be cached. The list of HTTP response codes that can be cached in browsers: 200, 201, 204, 206, 301, 302, 303, 304, 307, 308. Other response codes will not be cached. The default value is 4 days.

A set of the numeric parameters.

options.
browserCacheSettings.
enabled
boolean (boolean)

True - the option is enabled and its value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

options.
cacheHttpHeaders.
value[]
string

Value of the option.

options.
queryParamsOptions
object

Set up ResourceOptionsQueryParamsOptions.

A set of the query parameters.

options.
queryParamsOptions.
ignoreQueryString
object
Using ResourceOptionsBoolOption. Choose the Forward Host header option if is important to send in the request to the Origin the same Host header as was sent in the request to CDN server.
options.queryParamsOptions includes only one of the fields ignoreQueryString, queryParamsWhitelist, queryParamsBlacklist
options.
queryParamsOptions.
ignoreQueryString.
enabled
boolean (boolean)

True - the option is enabled and its value is applied to the resource. False - the option is disabled and its default value is used for the resource.

options.
queryParamsOptions.
ignoreQueryString.
value
boolean (boolean)

Value of the option.

options.
queryParamsOptions.
queryParamsWhitelist
object
The option allows to compress content with brotli on the CDN's end. Compression is performed on the Origin Shielding. If a pre-cache server doesn't active for a resource, compression does not occur even if the option is enabled. Specify the content-type for each type of content you wish to have compressed. CDN servers will request only uncompressed content from the origin.
options.queryParamsOptions includes only one of the fields ignoreQueryString, queryParamsWhitelist, queryParamsBlacklist
options.
queryParamsOptions.
queryParamsWhitelist.
enabled
boolean (boolean)

True - the option is enabled and its value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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
Custom value for the Host header. Your server must be able to process requests with the chosen header. Default value (if enabled is false) is Resource.cname.
options.hostOptions includes only one of the fields host, forwardHostHeader
options.
hostOptions.
host.
enabled
boolean (boolean)

True - the option is enabled and its value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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: error, http_403, http_404, http_429, http_500, http_502, http_503, http_504, invalid_header, timeout, updating.

A set of the string list parameters.

options.
stale.
enabled
boolean (boolean)

True - the option is enabled and its value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 value is applied to the resource. False - the option is disabled and its default value is used for the resource.

options.
customServerName.
value
string

Value of the option.

options.
ignoreCookie
object

Using ResourceOptionsBoolOption for ignoring cookie.

Set up bool values.

options.
ignoreCookie.
enabled
boolean (boolean)

True - the option is enabled and its value is applied to the resource. False - the option is disabled and its default value is used for the resource.

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 flag is applied to the resource. False - the option is disabled and its default value of the flag is used for the resource.

options.
rewrite.
body
string

Pattern for rewrite.

The value must have the following format: <source path> <destination path>, where both paths are regular expressions which use at least one group. E.g., /foo/(.*) /bar/$1.

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.

  • LAST: Stops processing of the current set of ngx_http_rewrite_module directives and starts a search for a new location matching changed URI.
  • BREAK: Stops processing of the current set of the Rewrite option.
  • REDIRECT: Returns a temporary redirect with the 302 code; It is used when a replacement string does not start with "http://", "https://", or "$scheme".
  • PERMANENT: Returns a permanent redirect with the 301 code.
sslCertificate object

SSL Certificate options.

A set of the personal SSL certificate parameters.

sslCertificate.
type
string

Type of the certificate.

A certificate type parameters.

  • SSL_CERTIFICATE_TYPE_UNSPECIFIED: SSL certificate is unspecified. - DONT_USE: No SSL certificate is added, the requests are sent via HTTP.
  • LETS_ENCRYPT_GCORE: Works only if you have already pointed your domain name to the protected IP address in your DNS
  • CM: Add your SSL certificate by uploading the certificate in PEM format and your private key
sslCertificate.
data
object

Certificate data.

A certificate data parameters.

sslCertificate.
data.
cm
object
Custom (add your SSL certificate by uploading the certificate in PEM format and your private key).
sslCertificate.
data.
cm.
id
string

ID of the custom certificate.

Response

HTTP Code: 200 - OK

{
  "id": "string",
  "description": "string",
  "createdAt": "string",
  "createdBy": "string",
  "modifiedAt": "string",
  "done": true,
  "metadata": "object",

  //  includes only one of the fields `error`, `response`
  "error": {
    "code": "integer",
    "message": "string",
    "details": [
      "object"
    ]
  },
  "response": "object",
  // end of the list of possible fields

}

An Operation resource. For more information, see Operation.

Field Description
id string

ID of the operation.

description string

Description of the operation. 0-256 characters long.

createdAt string (date-time)

Creation timestamp.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

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).

createdBy string

ID of the user or service account who initiated the operation.

modifiedAt string (date-time)

The time when the Operation resource was last modified.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

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).

done boolean (boolean)

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

metadata object

Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.

error object
The error result of the operation in case of failure or cancellation.
includes only one of the fields error, response
error.
code
integer (int32)

Error code. An enum value of google.rpc.Code.

error.
message
string

An error message.

error.
details[]
object

A list of messages that carry the error details.

response object
includes only one of the fields error, response

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • HTTP request
  • Body parameters
  • Response