Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • Машинное обучение
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Истории успеха
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Документация
  • Блог
Проект Яндекса
© 2025 ООО «Яндекс.Облако»
Yandex Serverless Integrations
  • Правила тарификации
  • Справочник Terraform
    • Аутентификация в API
      • Overview
        • Overview
        • Get
        • List
        • Create
        • Update
        • Delete
        • Enable
        • Disable
        • ListAccessBindings
        • SetAccessBindings
        • UpdateAccessBindings
        • ListOperations
  • История изменений

В этой статье:

  • HTTP request
  • Path parameters
  • Body parameters
  • Filter
  • Target
  • YdsTarget
  • YmqTarget
  • FunctionTarget
  • BatchSettings
  • ContainerTarget
  • GatewayWebsocketBroadcastTarget
  • LoggingTarget
  • WorkflowTarget
  • Transformer
  • RetrySettings
  • PutQueueMessage
  • Response
  • UpdateRuleMetadata
  • Status
  • Rule
  • Filter
  • Target
  • YdsTarget
  • YmqTarget
  • FunctionTarget
  • BatchSettings
  • ContainerTarget
  • GatewayWebsocketBroadcastTarget
  • LoggingTarget
  • WorkflowTarget
  • Transformer
  • RetrySettings
  • PutQueueMessage
  1. Справочник API EventRouter
  2. REST (англ.)
  3. Rule
  4. Update

EventRouter Service, REST: Rule.Update

Статья создана
Yandex Cloud
Обновлена 14 января 2025 г.
  • HTTP request
  • Path parameters
  • Body parameters
  • Filter
  • Target
  • YdsTarget
  • YmqTarget
  • FunctionTarget
  • BatchSettings
  • ContainerTarget
  • GatewayWebsocketBroadcastTarget
  • LoggingTarget
  • WorkflowTarget
  • Transformer
  • RetrySettings
  • PutQueueMessage
  • Response
  • UpdateRuleMetadata
  • Status
  • Rule
  • Filter
  • Target
  • YdsTarget
  • YmqTarget
  • FunctionTarget
  • BatchSettings
  • ContainerTarget
  • GatewayWebsocketBroadcastTarget
  • LoggingTarget
  • WorkflowTarget
  • Transformer
  • RetrySettings
  • PutQueueMessage

Updates the specified rule.

HTTP requestHTTP request

PATCH https://serverless-eventrouter.api.cloud.yandex.net/eventrouter/v1/rules/{ruleId}

Path parametersPath parameters

Field

Description

ruleId

string

Required field. ID of the rule to update.

Body parametersBody parameters

{
  "updateMask": "string",
  "name": "string",
  "description": "string",
  "labels": "object",
  "filter": {
    // Includes only one of the fields `jqFilter`
    "jqFilter": "string"
    // end of the list of possible fields
  },
  "targets": [
    {
      // Includes only one of the fields `yds`, `ymq`, `function`, `container`, `gatewayWsBroadcast`, `logging`, `workflow`
      "yds": {
        "database": "string",
        "streamName": "string",
        "serviceAccountId": "string"
      },
      "ymq": {
        "queueArn": "string",
        "serviceAccountId": "string"
      },
      "function": {
        "functionId": "string",
        "functionTag": "string",
        "serviceAccountId": "string",
        "batchSettings": {
          "maxCount": "string",
          "maxBytes": "string",
          "cutoff": "string"
        }
      },
      "container": {
        "containerId": "string",
        "containerRevisionId": "string",
        "path": "string",
        "serviceAccountId": "string",
        "batchSettings": {
          "maxCount": "string",
          "maxBytes": "string",
          "cutoff": "string"
        }
      },
      "gatewayWsBroadcast": {
        "gatewayId": "string",
        "path": "string",
        "serviceAccountId": "string",
        "batchSettings": {
          "maxCount": "string",
          "maxBytes": "string",
          "cutoff": "string"
        }
      },
      "logging": {
        // Includes only one of the fields `logGroupId`, `folderId`
        "logGroupId": "string",
        "folderId": "string",
        // end of the list of possible fields
        "serviceAccountId": "string"
      },
      "workflow": {
        "workflowId": "string",
        "serviceAccountId": "string",
        "batchSettings": {
          "maxCount": "string",
          "maxBytes": "string",
          "cutoff": "string"
        }
      },
      // end of the list of possible fields
      "transformer": {
        // Includes only one of the fields `jqTransformer`
        "jqTransformer": "string"
        // end of the list of possible fields
      },
      "retrySettings": {
        "retryAttempts": "string",
        "maximumAge": "string"
      },
      // Includes only one of the fields `deadLetterQueue`
      "deadLetterQueue": {
        "queueArn": "string",
        "serviceAccountId": "string"
      },
      // end of the list of possible fields
      "status": "string"
    }
  ],
  "deletionProtection": "boolean"
}

Field

Description

updateMask

string (field-mask)

A comma-separated names off ALL fields to be updated.
Only the specified fields will be changed. The others will be left untouched.
If the field is specified in updateMask and no value for that field was sent in the request,
the field's value will be reset to the default. The default value for most fields is null or 0.

If updateMask is not sent in the request, all fields' values will be updated.
Fields specified in the request will be updated to provided values.
The rest of the fields will be reset to the default.

name

string

New name of the rule.

description

string

New description of the rule.

labels

object (map<string, string>)

New labels for the rule.

filter

Filter

New filter for the rule.

targets[]

Target

New targets for the rule.

deletionProtection

boolean

New flag that disallow deletion of the rule.

FilterFilter

Field

Description

jqFilter

string

JQ filter for matching events.

Includes only one of the fields jqFilter.

TargetTarget

Field

Description

yds

YdsTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

ymq

YmqTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

function

FunctionTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

container

ContainerTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

gatewayWsBroadcast

GatewayWebsocketBroadcastTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

logging

LoggingTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

workflow

WorkflowTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

transformer

Transformer

Transformer of the target.

retrySettings

RetrySettings

Retry settings of the target.

deadLetterQueue

PutQueueMessage

Dead letter queue.

Includes only one of the fields deadLetterQueue.

Dead letter settings of the target.

status

enum (Status)

Status of the target.

  • STATUS_UNSPECIFIED
  • ENABLED: Target is enabled.
  • DISABLED: Target is disabled.
  • RESOURCE_NOT_FOUND: Target does not exist.
  • PERMISSION_DENIED: Service account does not have read permission on source.
  • SUBJECT_NOT_FOUND: Service account not found.

YdsTargetYdsTarget

Field

Description

database

string

Required field. Stream database.

streamName

string

Required field. Full stream name, like /ru-central1/aoegtvhtp8ob********/cc8004q4lbo6********/test.

serviceAccountId

string

Required field. Service account, which has write permission on the stream.

YmqTargetYmqTarget

Field

Description

queueArn

string

Required field. Queue ARN.
Example: yrn:yc:ymq:ru-central1:aoe***:test

serviceAccountId

string

Required field. Service account which has write access to the queue.

FunctionTargetFunctionTarget

Field

Description

functionId

string

Required field. Function ID.

functionTag

string

Function tag, optional.

serviceAccountId

string

Service account which has call permission on the function, optional.

batchSettings

BatchSettings

Batch settings.

BatchSettingsBatchSettings

Field

Description

maxCount

string (int64)

Maximum batch size: trigger will send a batch if number of events exceeds this value.

maxBytes

string (int64)

Maximum batch size: trigger will send a batch if total size of events exceeds this value.

cutoff

string (duration)

Required field. Maximum batch size: trigger will send a batch if its lifetime exceeds this value.

ContainerTargetContainerTarget

Field

Description

containerId

string

Required field. Container ID.

containerRevisionId

string

Container revision ID.

path

string

Endpoint HTTP path to invoke.

serviceAccountId

string

Service account which should be used to call a container, optional.

batchSettings

BatchSettings

Batch settings.

GatewayWebsocketBroadcastTargetGatewayWebsocketBroadcastTarget

Field

Description

gatewayId

string

Required field. Gateway ID.

path

string

Required field. Path.

serviceAccountId

string

Required field. Service account which has permission for writing to websockets.

batchSettings

BatchSettings

Batch settings.

LoggingTargetLoggingTarget

Field

Description

logGroupId

string

Includes only one of the fields logGroupId, folderId.

Log group ID or folder ID.

folderId

string

Includes only one of the fields logGroupId, folderId.

Log group ID or folder ID.

serviceAccountId

string

Required field. Service account which has permission for writing logs.

WorkflowTargetWorkflowTarget

Field

Description

workflowId

string

Required field. Workflow ID.

serviceAccountId

string

Required field. SA which should be used to start workflow.

batchSettings

BatchSettings

Batch settings.

TransformerTransformer

Field

Description

jqTransformer

string

JQ string inrerpolation expression for changing event format.

Includes only one of the fields jqTransformer.

RetrySettingsRetrySettings

Field

Description

retryAttempts

string (int64)

Maximum number of retries (extra calls) before an action fails.

maximumAge

string (duration)

Event goes to dlq when its age exceeds this value. Default is 24h.

PutQueueMessagePutQueueMessage

Field

Description

queueArn

string

ID of the queue.

serviceAccountId

string

Required field. Service account which has write permission on the queue.

ResponseResponse

HTTP Code: 200 - OK

{
  "id": "string",
  "description": "string",
  "createdAt": "string",
  "createdBy": "string",
  "modifiedAt": "string",
  "done": "boolean",
  "metadata": {
    "ruleId": "string"
  },
  // Includes only one of the fields `error`, `response`
  "error": {
    "code": "integer",
    "message": "string",
    "details": [
      "object"
    ]
  },
  "response": {
    "id": "string",
    "busId": "string",
    "folderId": "string",
    "cloudId": "string",
    "createdAt": "string",
    "name": "string",
    "description": "string",
    "labels": "object",
    "filter": {
      // Includes only one of the fields `jqFilter`
      "jqFilter": "string"
      // end of the list of possible fields
    },
    "targets": [
      {
        // Includes only one of the fields `yds`, `ymq`, `function`, `container`, `gatewayWsBroadcast`, `logging`, `workflow`
        "yds": {
          "database": "string",
          "streamName": "string",
          "serviceAccountId": "string"
        },
        "ymq": {
          "queueArn": "string",
          "serviceAccountId": "string"
        },
        "function": {
          "functionId": "string",
          "functionTag": "string",
          "serviceAccountId": "string",
          "batchSettings": {
            "maxCount": "string",
            "maxBytes": "string",
            "cutoff": "string"
          }
        },
        "container": {
          "containerId": "string",
          "containerRevisionId": "string",
          "path": "string",
          "serviceAccountId": "string",
          "batchSettings": {
            "maxCount": "string",
            "maxBytes": "string",
            "cutoff": "string"
          }
        },
        "gatewayWsBroadcast": {
          "gatewayId": "string",
          "path": "string",
          "serviceAccountId": "string",
          "batchSettings": {
            "maxCount": "string",
            "maxBytes": "string",
            "cutoff": "string"
          }
        },
        "logging": {
          // Includes only one of the fields `logGroupId`, `folderId`
          "logGroupId": "string",
          "folderId": "string",
          // end of the list of possible fields
          "serviceAccountId": "string"
        },
        "workflow": {
          "workflowId": "string",
          "serviceAccountId": "string",
          "batchSettings": {
            "maxCount": "string",
            "maxBytes": "string",
            "cutoff": "string"
          }
        },
        // end of the list of possible fields
        "transformer": {
          // Includes only one of the fields `jqTransformer`
          "jqTransformer": "string"
          // end of the list of possible fields
        },
        "retrySettings": {
          "retryAttempts": "string",
          "maximumAge": "string"
        },
        // Includes only one of the fields `deadLetterQueue`
        "deadLetterQueue": {
          "queueArn": "string",
          "serviceAccountId": "string"
        },
        // end of the list of possible fields
        "status": "string"
      }
    ],
    "deletionProtection": "boolean",
    "status": "string"
  }
  // 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

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

UpdateRuleMetadata

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

Status

The error result of the operation in case of failure or cancellation.

Includes only one of the fields error, 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.

response

Rule

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.

Includes only one of the fields error, 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.

UpdateRuleMetadataUpdateRuleMetadata

Field

Description

ruleId

string

Required field. ID of the rule that is being updated.

StatusStatus

The error result of the operation in case of failure or cancellation.

Field

Description

code

integer (int32)

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

message

string

An error message.

details[]

object

A list of messages that carry the error details.

RuleRule

Field

Description

id

string

ID of the rule.

busId

string

ID of the bus that the rule belongs to.

folderId

string

ID of the folder that the rule resides in.

cloudId

string

ID of the cloud that the rule resides in.

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

name

string

Name of the rule.

description

string

Description of the rule.

labels

object (map<string, string>)

Resource labels as key:value pairs.

filter

Filter

Filter for the rule.

targets[]

Target

Targets of the rule.

deletionProtection

boolean

Flag that disallow deletion of the rule.

status

enum (Status)

Rule status

  • STATUS_UNSPECIFIED
  • CREATING: Rule creation in progress, rule is not enabled yet
  • ENABLED: Rule is operating
  • UPDATING: Rule update in progress, rule is disabled during update
  • DISABLED: Rule is explicitly disabled by the user
  • DELETING: Rule deletion in progress

FilterFilter

Field

Description

jqFilter

string

JQ filter for matching events.

Includes only one of the fields jqFilter.

TargetTarget

Field

Description

yds

YdsTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

ymq

YmqTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

function

FunctionTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

container

ContainerTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

gatewayWsBroadcast

GatewayWebsocketBroadcastTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

logging

LoggingTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

workflow

WorkflowTarget

Includes only one of the fields yds, ymq, function, container, gatewayWsBroadcast, logging, workflow.

transformer

Transformer

Transformer of the target.

retrySettings

RetrySettings

Retry settings of the target.

deadLetterQueue

PutQueueMessage

Dead letter queue.

Includes only one of the fields deadLetterQueue.

Dead letter settings of the target.

status

enum (Status)

Status of the target.

  • STATUS_UNSPECIFIED
  • ENABLED: Target is enabled.
  • DISABLED: Target is disabled.
  • RESOURCE_NOT_FOUND: Target does not exist.
  • PERMISSION_DENIED: Service account does not have read permission on source.
  • SUBJECT_NOT_FOUND: Service account not found.

YdsTargetYdsTarget

Field

Description

database

string

Required field. Stream database.

streamName

string

Required field. Full stream name, like /ru-central1/aoegtvhtp8ob********/cc8004q4lbo6********/test.

serviceAccountId

string

Required field. Service account, which has write permission on the stream.

YmqTargetYmqTarget

Field

Description

queueArn

string

Required field. Queue ARN.
Example: yrn:yc:ymq:ru-central1:aoe***:test

serviceAccountId

string

Required field. Service account which has write access to the queue.

FunctionTargetFunctionTarget

Field

Description

functionId

string

Required field. Function ID.

functionTag

string

Function tag, optional.

serviceAccountId

string

Service account which has call permission on the function, optional.

batchSettings

BatchSettings

Batch settings.

BatchSettingsBatchSettings

Field

Description

maxCount

string (int64)

Maximum batch size: trigger will send a batch if number of events exceeds this value.

maxBytes

string (int64)

Maximum batch size: trigger will send a batch if total size of events exceeds this value.

cutoff

string (duration)

Required field. Maximum batch size: trigger will send a batch if its lifetime exceeds this value.

ContainerTargetContainerTarget

Field

Description

containerId

string

Required field. Container ID.

containerRevisionId

string

Container revision ID.

path

string

Endpoint HTTP path to invoke.

serviceAccountId

string

Service account which should be used to call a container, optional.

batchSettings

BatchSettings

Batch settings.

GatewayWebsocketBroadcastTargetGatewayWebsocketBroadcastTarget

Field

Description

gatewayId

string

Required field. Gateway ID.

path

string

Required field. Path.

serviceAccountId

string

Required field. Service account which has permission for writing to websockets.

batchSettings

BatchSettings

Batch settings.

LoggingTargetLoggingTarget

Field

Description

logGroupId

string

Includes only one of the fields logGroupId, folderId.

Log group ID or folder ID.

folderId

string

Includes only one of the fields logGroupId, folderId.

Log group ID or folder ID.

serviceAccountId

string

Required field. Service account which has permission for writing logs.

WorkflowTargetWorkflowTarget

Field

Description

workflowId

string

Required field. Workflow ID.

serviceAccountId

string

Required field. SA which should be used to start workflow.

batchSettings

BatchSettings

Batch settings.

TransformerTransformer

Field

Description

jqTransformer

string

JQ string inrerpolation expression for changing event format.

Includes only one of the fields jqTransformer.

RetrySettingsRetrySettings

Field

Description

retryAttempts

string (int64)

Maximum number of retries (extra calls) before an action fails.

maximumAge

string (duration)

Event goes to dlq when its age exceeds this value. Default is 24h.

PutQueueMessagePutQueueMessage

Field

Description

queueArn

string

ID of the queue.

serviceAccountId

string

Required field. Service account which has write permission on the queue.

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

Предыдущая
Create
Следующая
Delete
Проект Яндекса
© 2025 ООО «Яндекс.Облако»