Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Cloud Functions
  • Getting started
    • Overview
    • Creating and executing functions
    • Creating a timer
    • Creating a trigger for Message Queue
    • Creating a trigger for Object Storage
    • Creating a trigger for Container Registry
    • Creating a trigger for Cloud Logs
    • Creating a trigger for IoT Core
  • Step-by-step instructions
    • All instructions
    • Using functions to get an IAM token for a service account
    • Managing rights to access functions
    • Managing functions
      • Creating a function
      • Managing function versions
      • Working in the code editor
      • Invoking a function
      • Updating a function
      • Viewing monitoring charts
      • Viewing the execution log
      • Deleting a function
    • Managing triggers
      • Getting information about a trigger
      • Creating a timer
      • Creating a trigger for Message Queue
      • Creating a trigger for Object Storage
      • Creating a trigger for Container Registry
      • Creating a trigger for Cloud Logs
      • Creating a trigger for Yandex IoT Core
      • Updating a trigger
      • Deleting a trigger
  • Concepts
    • Overview
    • Function
    • Invoking a function
    • Runtime
      • Overview
      • Environment
      • Execution context
    • Builder
    • Trigger
      • Overview
      • Timer
      • Trigger for Message Queue
      • Trigger for Object Storage
      • Trigger for Container Registry
      • Trigger for Cloud Logs
      • Trigger for Yandex IoT Core
    • Log groups
    • Monitoring
    • Backups
    • Quotas and limits
  • Developing in Node.js
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Python
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Go
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in PHP
    • Overview
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
  • Developing in Bash
    • Overview
    • Request handler
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Java
    • Overview
    • Programming model
      • Overview
      • Function interface
      • YcFunction interface
      • HttpServlet class
      • Spring Boot
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in R
    • Overview
    • Programming model
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
  • Developing in C#
    • Overview
    • Programming model
      • Overview
      • Function interface
      • YcFunction interface
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Use cases
    • Creating skills for Alice
  • Pricing policy
  • Access management
  • API Functions reference
    • Authentication in the API
    • gRPC
      • Overview
      • FunctionService
      • OperationService
    • REST
      • Overview
      • Function
        • Overview
        • create
        • createVersion
        • delete
        • get
        • getVersion
        • getVersionByTag
        • list
        • listAccessBindings
        • listOperations
        • listRuntimes
        • listTagHistory
        • listVersions
        • removeTag
        • setAccessBindings
        • setTag
        • update
        • updateAccessBindings
  • API Triggers reference
    • Authentication in the API
    • gRPC
      • Overview
      • TriggerService
      • OperationService
    • REST
      • Overview
      • Trigger
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • pause
        • resume
        • update
  • Questions and answers
  1. Step-by-step instructions
  2. Managing triggers
  3. Updating a trigger

Updating a trigger

  • Changing the name of a trigger
  • Updating the description of a trigger
  • Managing trigger labels
    • Adding a label
    • Updating a label
    • Deleting a label

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

CLI

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

CLI

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:

  • Add a label
  • Update a label
  • Delete a label

Adding a label

CLI

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

CLI

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

CLI

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
In this article:
  • Changing the name of a trigger
  • Updating the description of a trigger
  • Managing trigger labels
  • Adding a label
  • Updating a label
  • Deleting a label
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC