Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex Cloud Functions
  • Comparison with other Yandex Cloud services
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Using functions to get an IAM token for a service account
    • Connecting to managed databases from functions
    • Getting information about a function
    • Managing rights to access functions
    • Creating a function
    • Invoking a function
    • Managing functions
    • Getting information about a trigger
    • Creating a trigger
    • Managing triggers
      • Updating a trigger
        • Updating a name
        • Updating a description
      • Managing labels
      • Viewing monitoring charts
      • Deleting a trigger
  • Concepts
  • Developing in Node.js
  • Developing in Python
  • Developing in Go
  • Developing in PHP
  • Developing in Bash
  • Developing in Java
  • Developing in R
  • Developing in C#
  • Practical guidelines
  • Pricing policy
  • Access management
  • API Functions reference
  • API Triggers reference
  • Questions and answers
  1. Step-by-step instructions
  2. Managing triggers
  3. Updating a trigger
  4. Updating a description

Updating the description of a trigger in Cloud Functions

Written by
Yandex Cloud
    Management console
    CLI
    API
    Terraform
    1. In the management console, select the folder containing your trigger.
    2. Select Cloud Functions.
    3. On the left-hand panel, select Triggers.
    4. Select the trigger whose description you want to update.
    5. In the upper-right corner of the page, click Edit.
    6. Edit the description and click Save.

    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.

    To update the trigger description, run the command:

    yc serverless trigger update <trigger name> --description "<trigger description>"
    

    Result:

    id: dd0gj5tsj2**********
    folder_id: aoek49ghmk**********
    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:aoek49ghmk**********:my-mq
        service_account_id: bfbqqeo6jk**********
        batch_settings:
          size: "10"
          cutoff: 10s
        invoke_function:
          function_id: b09e5lu91t**********
          function_tag: $latest
          service_account_id: bfbqqeo6jk**********
    status: ACTIVE
    

    You can update the trigger description using the update API method.

    For more information about Terraform, see the documentation.

    With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it by configuration files. They store the infrastructure description in HashiCorp Configuration Language (HCL). Terraform and its providers are distributed under the Mozilla Public License.

    For more information about the provider resources, see the documentation on the Terraform site or mirror site.

    If you change the configuration files, Terraform automatically determines which part of your configuration is already deployed and what should be added or removed.

    To update the trigger description:

    1. Open the Terraform configuration file and edit the description field in the trigger description:

      ...
      resource "yandex_function_trigger" "my_trigger" {
        name        = "some_name"
        description = "any description"
        timer {
          cron_expression = "* * * * ? *"
        }
        function {
          id = "tf-test"
        }
      }
      ...
      

      For more information about the yandex_function_trigger resource parameters in Terraform, see the provider documentation.

    2. Check the configuration using the command:

      terraform validate
      

      If the configuration is correct, the following message is returned:

      Success! The configuration is valid.
      
    3. Run the command:

      terraform plan
      

      The terminal will display a list of resources with parameters. No changes are made at this step. If the configuration contains errors, Terraform will point them out.

    4. Apply the configuration changes:

      terraform apply
      
    5. Confirm the changes: type yes into the terminal and press Enter.

      You can verify the change to the trigger in the management console or using this CLI command:

      yc serverless trigger get <trigger ID>
      

    Was the article helpful?

    Language / Region
    Yandex project
    © 2023 Yandex.Cloud LLC