EventRouter Service, REST: Rule methods
A set of methods for managing rules for serverless eventrouter.
JSON Representation
{
"id": "string",
"busId": "string",
"folderId": "string",
"cloudId": "string",
"createdAt": "string",
"name": "string",
"description": "string",
"labels": "object",
"filter": {
"jqFilter": "string"
},
"targets": [
{
"transformer": {
"jqTransformer": "string"
},
"retrySettings": {
"retryAttempts": "string",
"maximumAge": "string"
},
"status": "string",
// `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": {
"serviceAccountId": "string",
// `targets[].logging` includes only one of the fields `logGroupId`, `folderId`
"logGroupId": "string",
"folderId": "string",
// end of the list of possible fields`targets[].logging`
},
"workflow": {
"workflowId": "string",
"serviceAccountId": "string",
"batchSettings": {
"maxCount": "string",
"maxBytes": "string",
"cutoff": "string"
}
},
// end of the list of possible fields`targets[]`
"deadLetterQueue": {
"queueArn": "string",
"serviceAccountId": "string"
}
}
],
"deletionProtection": true,
"status": "string"
}
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 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 Resource labels as |
filter | object Filter for the rule. |
filter. jqFilter |
string JQ filter for matching events. The maximum string length in characters is 1024. |
targets[] | object Required. Targets of the rule. The number of elements must be in the range 1-5. |
targets[]. transformer |
object Transformer of the target. |
targets[]. transformer. jqTransformer |
string JQ string inrerpolation expression for changing event format. The maximum string length in characters is 65536. |
targets[]. retrySettings |
object Retry settings of the target. |
targets[]. retrySettings. retryAttempts |
string (int64) Maximum number of retries (extra calls) before an action fails. Acceptable values are 0 to 10, inclusive. |
targets[]. retrySettings. maximumAge |
string Event goes to dlq when its age exceeds this value. Default is 24h. The maximum value is 86400 seconds. |
targets[]. status |
string Status of the target.
|
targets[]. yds |
object targets[] includes only one of the fields yds , ymq , function , container , gatewayWsBroadcast , logging , workflow |
targets[]. yds. database |
string Required. Stream database. |
targets[]. yds. streamName |
string Required. Full stream name, like /ru-central1/aoegtvhtp8ob********/cc8004q4lbo6********/test. |
targets[]. yds. serviceAccountId |
string Required. Service account, which has write permission on the stream. The maximum string length in characters is 50. |
targets[]. ymq |
object targets[] includes only one of the fields yds , ymq , function , container , gatewayWsBroadcast , logging , workflow |
targets[]. ymq. queueArn |
string Required. Queue ARN. Example: yrn:yc:ymq:ru-central1:aoe***:test |
targets[]. ymq. serviceAccountId |
string Required. Service account which has write access to the queue. The maximum string length in characters is 50. |
targets[]. function |
object targets[] includes only one of the fields yds , ymq , function , container , gatewayWsBroadcast , logging , workflow |
targets[]. function. functionId |
string Required. Function ID. The maximum string length in characters is 50. |
targets[]. function. functionTag |
string Function tag, optional. |
targets[]. function. serviceAccountId |
string Service account which has call permission on the function, optional. The maximum string length in characters is 50. |
targets[]. function. batchSettings |
object Batch settings. |
targets[]. function. batchSettings. maxCount |
string (int64) Maximum batch size: trigger will send a batch if number of events exceeds this value. Acceptable values are 0 to 1000, inclusive. |
targets[]. function. batchSettings. maxBytes |
string (int64) Maximum batch size: trigger will send a batch if total size of events exceeds this value. Acceptable values are 0 to 262144, inclusive. |
targets[]. function. batchSettings. cutoff |
string Required. Maximum batch size: trigger will send a batch if its lifetime exceeds this value. The maximum value is 60 seconds. |
targets[]. container |
object targets[] includes only one of the fields yds , ymq , function , container , gatewayWsBroadcast , logging , workflow |
targets[]. container. containerId |
string Required. Container ID. The maximum string length in characters is 50. |
targets[]. container. containerRevisionId |
string Container revision ID. |
targets[]. container. path |
string Endpoint HTTP path to invoke. |
targets[]. container. serviceAccountId |
string Service account which should be used to call a container, optional. The maximum string length in characters is 50. |
targets[]. container. batchSettings |
object Batch settings. |
targets[]. container. batchSettings. maxCount |
string (int64) Maximum batch size: trigger will send a batch if number of events exceeds this value. Acceptable values are 0 to 1000, inclusive. |
targets[]. container. batchSettings. maxBytes |
string (int64) Maximum batch size: trigger will send a batch if total size of events exceeds this value. Acceptable values are 0 to 262144, inclusive. |
targets[]. container. batchSettings. cutoff |
string Required. Maximum batch size: trigger will send a batch if its lifetime exceeds this value. The maximum value is 60 seconds. |
targets[]. gatewayWsBroadcast |
object targets[] includes only one of the fields yds , ymq , function , container , gatewayWsBroadcast , logging , workflow |
targets[]. gatewayWsBroadcast. gatewayId |
string Required. Gateway ID. The maximum string length in characters is 50. |
targets[]. gatewayWsBroadcast. path |
string Required. Path. |
targets[]. gatewayWsBroadcast. serviceAccountId |
string Required. Service account which has permission for writing to websockets. The maximum string length in characters is 50. |
targets[]. gatewayWsBroadcast. batchSettings |
object Batch settings. |
targets[]. gatewayWsBroadcast. batchSettings. maxCount |
string (int64) Maximum batch size: trigger will send a batch if number of events exceeds this value. Acceptable values are 0 to 1000, inclusive. |
targets[]. gatewayWsBroadcast. batchSettings. maxBytes |
string (int64) Maximum batch size: trigger will send a batch if total size of events exceeds this value. Acceptable values are 0 to 262144, inclusive. |
targets[]. gatewayWsBroadcast. batchSettings. cutoff |
string Required. Maximum batch size: trigger will send a batch if its lifetime exceeds this value. The maximum value is 60 seconds. |
targets[]. logging |
object targets[] includes only one of the fields yds , ymq , function , container , gatewayWsBroadcast , logging , workflow |
targets[]. logging. serviceAccountId |
string Required. Service account which has permission for writing logs. The maximum string length in characters is 50. |
targets[]. logging. logGroupId |
string targets[].logging includes only one of the fields logGroupId , folderId The maximum string length in characters is 63. |
targets[]. logging. folderId |
string targets[].logging includes only one of the fields logGroupId , folderId The maximum string length in characters is 63. |
targets[]. workflow |
object targets[] includes only one of the fields yds , ymq , function , container , gatewayWsBroadcast , logging , workflow |
targets[]. workflow. workflowId |
string Required. Workflow ID. The maximum string length in characters is 50. |
targets[]. workflow. serviceAccountId |
string Required. SA which should be used to start workflow. The maximum string length in characters is 50. |
targets[]. workflow. batchSettings |
object Batch settings. |
targets[]. workflow. batchSettings. maxCount |
string (int64) Maximum batch size: trigger will send a batch if number of events exceeds this value. Acceptable values are 0 to 1000, inclusive. |
targets[]. workflow. batchSettings. maxBytes |
string (int64) Maximum batch size: trigger will send a batch if total size of events exceeds this value. Acceptable values are 0 to 262144, inclusive. |
targets[]. workflow. batchSettings. cutoff |
string Required. Maximum batch size: trigger will send a batch if its lifetime exceeds this value. The maximum value is 60 seconds. |
targets[]. deadLetterQueue |
object Dead letter queue. |
targets[]. deadLetterQueue. queueArn |
string ID of the queue. |
targets[]. deadLetterQueue. serviceAccountId |
string Required. Service account which has write permission on the queue. The maximum string length in characters is 50. |
deletionProtection | boolean (boolean) Flag that disallow deletion of the rule. |
status | string Rule status
|
Methods
Method | Description |
---|---|
create | Creates a rule in the specified folder. |
delete | Deletes the specified rule. |
disable | Disables the specified rule. |
enable | Enables the specified rule. |
get | Returns the specified rules. To get the list of all available buses, make a list request. |
list | Retrieves the list of rules in the specified folder. |
listAccessBindings | Lists existing access bindings for the specified rule. |
listOperations | Lists operations for the specified rule. |
setAccessBindings | Sets access bindings for the rule. |
update | Updates the specified rule. |
updateAccessBindings | Updates access bindings for the specified rule. |