Updating a trigger
Triggers is currently at the Preview stage.
You can change the name and description of a trigger and manage trigger labels.
To access a trigger, use its name or unique ID. To find them, get a list of triggers in a folder.
Changing the name of a trigger
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
Change the trigger name:
$ yc serverless trigger update <trigger name> --new-name <new trigger name>
Result:
id: dd0gj5tsj2pq9at8ja8i
folder_id: aoek49ghmknnpj1ll45e
created_at: "2019-08-28T12:26:25.675Z"
name: my-trigger
rule:
message_queue:
queue_id: yrn:yc:ymq:ru-central1:aoek49ghmknnpj1ll45e:my-mq
service_account_id: bfbqqeo6jkpls2tse5o6
batch_settings:
size: "10"
cutoff: 10s
invoke_function:
function_id: b09e5lu91ta21vdrrgma
function_tag: $latest
service_account_id: bfbqqeo6jkpls2tse5o6
status: ACTIVE
Updating the description of a trigger
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
Update the trigger description:
$ yc serverless trigger update <trigger name> --description "<trigger description>"
Result:
id: dd0gj5tsj2pq9at8ja8i
folder_id: aoek49ghmknnpj1ll45e
created_at: "2019-08-28T12:26:25.675Z"
name: my-trigger
description: My YMQ trigger.
rule:
message_queue:
queue_id: yrn:yc:ymq:ru-central1:aoek49ghmknnpj1ll45e:my-mq
service_account_id: bfbqqeo6jkpls2tse5o6
batch_settings:
size: "10"
cutoff: 10s
invoke_function:
function_id: b09e5lu91ta21vdrrgma
function_tag: $latest
service_account_id: bfbqqeo6jkpls2tse5o6
status: ACTIVE
Managing trigger labels
You can perform the following actions with trigger labels:
Adding a label
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
Add a label to a trigger:
$ yc serverless trigger add-labels <trigger name> --labels <key>=<value>
Result:
id: dd0gj5tsj2pq9at8ja8i
folder_id: aoek49ghmknnpj1ll45e
created_at: "2019-08-28T12:26:25.675Z"
name: my-trigger
description: My YMQ trigger.
labels:
version: beta
rule:
message_queue:
queue_id: yrn:yc:ymq:ru-central1:aoek49ghmknnpj1ll45e:my-mq
service_account_id: bfbqqeo6jkpls2tse5o6
batch_settings:
size: "10"
cutoff: 10s
invoke_function:
function_id: b09e5lu91ta21vdrrgma
function_tag: $latest
service_account_id: bfbqqeo6jkpls2tse5o6
status: ACTIVE
Updating a label
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
Update a trigger label:
Warning
The existing set of labels
is completely replaced by the set transmitted.
$ yc serverless trigger update <trigger name> --labels <key>=<value>
Result:
id: dd0gj5tsj2pq9at8ja8i
folder_id: aoek49ghmknnpj1ll45e
created_at: "2019-08-28T12:26:25.675Z"
name: my-trigger
description: My YMQ trigger.
labels:
new_labels: my-beta-trigger
rule:
message_queue:
queue_id: yrn:yc:ymq:ru-central1:aoek49ghmknnpj1ll45e:my-mq
service_account_id: bfbqqeo6jkpls2tse5o6
batch_settings:
size: "10"
cutoff: 10s
invoke_function:
function_id: b09e5lu91ta21vdrrgma
function_tag: $latest
service_account_id: bfbqqeo6jkpls2tse5o6
status: ACTIVE
Deleting a label
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
Delete a trigger label:
$ yc serverless trigger remove-labels <trigger name> --labels <key>
Result:
id: dd0gj5tsj2pq9at8ja8i
folder_id: aoek49ghmknnpj1ll45e
created_at: "2019-08-28T12:26:25.675Z"
name: my-trigger
description: My YMQ trigger.
rule:
message_queue:
queue_id: yrn:yc:ymq:ru-central1:aoek49ghmknnpj1ll45e:my-mq
service_account_id: bfbqqeo6jkpls2tse5o6
batch_settings:
size: "10"
cutoff: 10s
invoke_function:
function_id: b09e5lu91ta21vdrrgma
function_tag: $latest
service_account_id: bfbqqeo6jkpls2tse5o6
status: ACTIVE