Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
© 2022 ООО «Яндекс.Облако»
Yandex Cloud CDN
  • Начало работы
  • Пошаговые инструкции
    • Все инструкции
    • Ресурсы
      • Создать ресурс
      • Изменить основные настройки ресурса
      • Настроить кеширование ресурса
      • Настроить выгрузку логов
      • Предзагрузить файлы на CDN-серверы
      • Очистить кеш ресурса
      • Настроить заголовки запросов и ответов
      • Настроить CORS при ответах клиентам
      • Настроить HTTP-методы
      • Включить сжатие файлов
      • Включить сегментацию файлов
      • Включить экранирование источников
      • Отключить ресурс
      • Удалить ресурс
    • Группы источников
      • Создать группу источников
      • Изменить группу источников
      • Подключить группу источников к ресурсу
      • Удалить группу источников
  • Практические руководства
    • Публикация обновлений для игр
    • Интеграция L7-балансировщика с CDN и Object Storage
    • Сине-зеленое и канареечное развертывание версий сервиса
  • Концепции
    • Обзор сервиса
    • Ресурс
    • Источники и их группы
    • Обмен данными между клиентами и CDN
      • Обзор
      • TLS-сертификаты
      • CORS
      • Сжатие контента
    • Обмен данными между CDN и источниками
      • Обзор
      • Заголовок Host
      • Сегментация контента
      • Экранирование источников
    • Кеширование контента
    • Выгрузка логов
    • Квоты и лимиты
  • Управление доступом
  • Решение проблем
  • Справочник API
    • Аутентификация в 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
  • Правила тарификации
  1. Справочник API
  2. gRPC (англ.)
  3. OriginService

OriginService

Статья создана
Yandex Cloud
  • Calls OriginService
  • Get
    • GetOriginRequest
    • Origin
    • OriginMeta
    • OriginNamedMeta
    • OriginBalancerMeta
  • List
    • ListOriginsRequest
    • ListOriginsResponse
    • Origin
    • OriginMeta
    • OriginNamedMeta
    • OriginBalancerMeta
  • Create
    • CreateOriginRequest
    • OriginMeta
    • OriginNamedMeta
    • OriginBalancerMeta
    • Operation
    • CreateOriginMetadata
    • Origin
    • OriginMeta
    • OriginNamedMeta
    • OriginBalancerMeta
  • Update
    • UpdateOriginRequest
    • OriginMeta
    • OriginNamedMeta
    • OriginBalancerMeta
    • Operation
    • UpdateOriginMetadata
    • Origin
    • OriginMeta
    • OriginNamedMeta
    • OriginBalancerMeta
  • Delete
    • DeleteOriginRequest
    • Operation
    • DeleteOriginMetadata

Origin management service.
Origin is not a standalone entity. It can live only within origin group.

Call Description
Get Get origin in origin group.
List Lists origins of origin group.
Create Creates origin inside origin group.
Update Updates the specified origin from the origin group.
Delete Deletes origin from origin group.

Calls OriginService

Get

Get origin in origin group.

rpc Get (GetOriginRequest) returns (Origin)

GetOriginRequest

Field Description
folder_id string
Required. ID of the folder that the origin belongs to. The maximum string length in characters is 50.
origin_id int64
origin_id group ID to request origin from. Value must be greater than 0.

Origin

Field Description
id int64
ID of the origin.
origin_group_id int64
ID of the parent origin group.
source string
IP address or Domain name of your origin and the port (if custom). Used if meta variant is common.
enabled bool
The setting allows to enable or disable an Origin source in the Origins group.
It has two possible values:
True - The origin is enabled and used as a source for the CDN. An origins group must contain at least one enabled origin. False - The origin is disabled and the CDN is not using it to pull content.
backup bool
Specifies whether the origin is used in its origin group as backup. A backup origin is used when one of active origins becomes unavailable.
meta OriginMeta
Set up origin of the content.

OriginMeta

Field Description
origin_meta_variant oneof: common, bucket, website or balancer
Type of the origin.
  common OriginNamedMeta
A server with a domain name linked to it
  bucket OriginNamedMeta
An Object Storage bucket not configured as a static site hosting.
  website OriginNamedMeta
An Object Storage bucket configured as a static site hosting.
  balancer OriginBalancerMeta
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.

OriginNamedMeta

Field Description
name string
Name of the origin.

OriginBalancerMeta

Field Description
id string
ID of the origin.

List

Lists origins of origin group.

rpc List (ListOriginsRequest) returns (ListOriginsResponse)

ListOriginsRequest

Field Description
folder_id string
Required. ID of the folder that the origin belongs to. The maximum string length in characters is 50.
origin_group_id int64
ID of the group to request origins from. Value must be greater than 0.

ListOriginsResponse

Field Description
origins[] Origin
Origin from response.

Origin

Field Description
id int64
ID of the origin.
origin_group_id int64
ID of the parent origin group.
source string
IP address or Domain name of your origin and the port (if custom). Used if meta variant is common.
enabled bool
The setting allows to enable or disable an Origin source in the Origins group.
It has two possible values:
True - The origin is enabled and used as a source for the CDN. An origins group must contain at least one enabled origin. False - The origin is disabled and the CDN is not using it to pull content.
backup bool
Specifies whether the origin is used in its origin group as backup. A backup origin is used when one of active origins becomes unavailable.
meta OriginMeta
Set up origin of the content.

OriginMeta

Field Description
origin_meta_variant oneof: common, bucket, website or balancer
Type of the origin.
  common OriginNamedMeta
A server with a domain name linked to it
  bucket OriginNamedMeta
An Object Storage bucket not configured as a static site hosting.
  website OriginNamedMeta
An Object Storage bucket configured as a static site hosting.
  balancer OriginBalancerMeta
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.

OriginNamedMeta

Field Description
name string
Name of the origin.

OriginBalancerMeta

Field Description
id string
ID of the origin.

Create

Creates origin inside origin group.

rpc Create (CreateOriginRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:CreateOriginMetadata

    Operation.response:Origin

CreateOriginRequest

Field Description
folder_id string
Required. ID of the folder that the origin belongs to. The maximum string length in characters is 50.
origin_group_id int64
origin_group_id group ID to request origins from. Value must be greater than 0.
source string
Required. IP address or Domain name of your origin and the port (if custom). Used if meta variant is common. The maximum string length in characters is 50.
enabled google.protobuf.BoolValue
The setting allows to enable or disable an Origin source in the Origins group.
It has two possible values:
True - The origin is enabled and used as a source for the CDN. An origins group must contain at least one enabled origin. Default value. False - The origin is disabled and the CDN is not using it to pull content.
backup google.protobuf.BoolValue
Specifies whether the origin is used in its origin group as backup. A backup origin is used when one of active origins becomes unavailable.
Default value: False.
meta OriginMeta
Set up origin of the content.

OriginMeta

Field Description
origin_meta_variant oneof: common, bucket, website or balancer
Type of the origin.
  common OriginNamedMeta
A server with a domain name linked to it
  bucket OriginNamedMeta
An Object Storage bucket not configured as a static site hosting.
  website OriginNamedMeta
An Object Storage bucket configured as a static site hosting.
  balancer OriginBalancerMeta
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.

OriginNamedMeta

Field Description
name string
Name of the origin.

OriginBalancerMeta

Field Description
id string
ID of the origin.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
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 google.protobuf.Any<CreateOriginMetadata>
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.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<Origin>
if operation finished successfully.

CreateOriginMetadata

Field Description
origin_id int64
ID of the origin. Value must be greater than 0.
origin_group_id int64
ID pf the parent origins group. Value must be greater than 0.

Origin

Field Description
id int64
ID of the origin.
origin_group_id int64
ID of the parent origin group.
source string
IP address or Domain name of your origin and the port (if custom). Used if meta variant is common.
enabled bool
The setting allows to enable or disable an Origin source in the Origins group.
It has two possible values:
True - The origin is enabled and used as a source for the CDN. An origins group must contain at least one enabled origin. False - The origin is disabled and the CDN is not using it to pull content.
backup bool
Specifies whether the origin is used in its origin group as backup. A backup origin is used when one of active origins becomes unavailable.
meta OriginMeta
Set up origin of the content.

OriginMeta

Field Description
origin_meta_variant oneof: common, bucket, website or balancer
Type of the origin.
  common OriginNamedMeta
A server with a domain name linked to it
  bucket OriginNamedMeta
An Object Storage bucket not configured as a static site hosting.
  website OriginNamedMeta
An Object Storage bucket configured as a static site hosting.
  balancer OriginBalancerMeta
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.

OriginNamedMeta

Field Description
name string
Name of the origin.

OriginBalancerMeta

Field Description
id string
ID of the origin.

Update

Updates the specified origin from the origin group.
Changes may take up to 15 minutes to apply. Afterwards, it is recommended to purge cache of the resources that use the origin via a CacheService.Purge request.

rpc Update (UpdateOriginRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateOriginMetadata

    Operation.response:Origin

UpdateOriginRequest

Field Description
folder_id string
Required. ID of the folder that the origin belongs to. The maximum string length in characters is 50.
origin_id int64
ID of the origin. Value must be greater than 0.
source string
PUT behavior, parameter below will be fully rewritten IP address or Domain name of your origin and the port (if custom). Used if meta variant is common. Required.
enabled bool
The setting allows to enable or disable an Origin source in the Origins group.
It has two possible values:
True - The origin is enabled and used as a source for the CDN. An origins group must contain at least one enabled origin. Default value. False - The origin is disabled and the CDN is not using it to pull content.
Required.
backup bool
Specifies whether the origin is used in its origin group as backup. A backup origin is used when one of active origins becomes unavailable.
Required.
meta OriginMeta
Set up type of the origin.

OriginMeta

Field Description
origin_meta_variant oneof: common, bucket, website or balancer
Type of the origin.
  common OriginNamedMeta
A server with a domain name linked to it
  bucket OriginNamedMeta
An Object Storage bucket not configured as a static site hosting.
  website OriginNamedMeta
An Object Storage bucket configured as a static site hosting.
  balancer OriginBalancerMeta
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.

OriginNamedMeta

Field Description
name string
Name of the origin.

OriginBalancerMeta

Field Description
id string
ID of the origin.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
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 google.protobuf.Any<UpdateOriginMetadata>
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.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<Origin>
if operation finished successfully.

UpdateOriginMetadata

Field Description
origin_id int64
ID of the origin. Value must be greater than 0.
origin_group_id int64
Parent origins group ID. Value must be greater than 0.

Origin

Field Description
id int64
ID of the origin.
origin_group_id int64
ID of the parent origin group.
source string
IP address or Domain name of your origin and the port (if custom). Used if meta variant is common.
enabled bool
The setting allows to enable or disable an Origin source in the Origins group.
It has two possible values:
True - The origin is enabled and used as a source for the CDN. An origins group must contain at least one enabled origin. False - The origin is disabled and the CDN is not using it to pull content.
backup bool
Specifies whether the origin is used in its origin group as backup. A backup origin is used when one of active origins becomes unavailable.
meta OriginMeta
Set up origin of the content.

OriginMeta

Field Description
origin_meta_variant oneof: common, bucket, website or balancer
Type of the origin.
  common OriginNamedMeta
A server with a domain name linked to it
  bucket OriginNamedMeta
An Object Storage bucket not configured as a static site hosting.
  website OriginNamedMeta
An Object Storage bucket configured as a static site hosting.
  balancer OriginBalancerMeta
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.

OriginNamedMeta

Field Description
name string
Name of the origin.

OriginBalancerMeta

Field Description
id string
ID of the origin.

Delete

Deletes origin from origin group.

rpc Delete (DeleteOriginRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:DeleteOriginMetadata

    Operation.response:google.protobuf.Empty

DeleteOriginRequest

Field Description
folder_id string
Required. ID of the folder that the origin belongs to. The maximum string length in characters is 50.
origin_id int64
ID of the origin. Value must be greater than 0.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
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 google.protobuf.Any<DeleteOriginMetadata>
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.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<google.protobuf.Empty>
if operation finished successfully.

DeleteOriginMetadata

Field Description
origin_id int64
ID of the origin. Value must be greater than 0.

Была ли статья полезна?

Language / Region
© 2022 ООО «Яндекс.Облако»
В этой статье:
  • Calls OriginService
  • Get
  • GetOriginRequest
  • Origin
  • OriginMeta
  • OriginNamedMeta
  • OriginBalancerMeta
  • List
  • ListOriginsRequest
  • ListOriginsResponse
  • Origin
  • OriginMeta
  • OriginNamedMeta
  • OriginBalancerMeta
  • Create
  • CreateOriginRequest
  • OriginMeta
  • OriginNamedMeta
  • OriginBalancerMeta
  • Operation
  • CreateOriginMetadata
  • Origin
  • OriginMeta
  • OriginNamedMeta
  • OriginBalancerMeta
  • Update
  • UpdateOriginRequest
  • OriginMeta
  • OriginNamedMeta
  • OriginBalancerMeta
  • Operation
  • UpdateOriginMetadata
  • Origin
  • OriginMeta
  • OriginNamedMeta
  • OriginBalancerMeta
  • Delete
  • DeleteOriginRequest
  • Operation
  • DeleteOriginMetadata