[Yandex Cloud documentation](../../../index.md) > [Yandex API Gateway](../../index.md) > [Step-by-step guides](../index.md) > Managing a trigger > Updating a trigger

# Updating a trigger in Yandex API Gateway

You can update any parameters except for the trigger type and launched resource type.

{% note info %}

Your changes will apply within five minutes.

{% endnote %}

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), navigate to the folder containing the trigger.
  1. Navigate to **API Gateway**.
  1. In the left-hand panel, select ![image](../../../_assets/console-icons/gear-play.svg) **Triggers**.
  1. Select the trigger whose settings you want to update.
  1. Click ![image](../../../_assets/console-icons/pencil.svg) **Edit**.
  1. Edit the trigger settings and click **Save**.

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  To find out the name or ID of a trigger, [get](../../../serverless-containers/operations/trigger-list.md) the list of triggers in the folder.

  1. See the description of the CLI command for updating trigger settings:

      ```bash
      yc serverless trigger update <trigger_type> --help
      ```

  1. Update the trigger settings, e.g., rename the trigger:

      ```bash
      yc serverless trigger update <trigger_type> <trigger_name> \ 
        --new-name <new_trigger_name> 
      ```

      Result:

      ```text
      id: a1s5msktijh2********
      folder_id: b1gmit33hgh2********
      created_at: "2022-10-24T15:19:15.353909857Z"
      name: my-trigger
      rule:
        object_storage:
          event_type:
          - OBJECT_STORAGE_EVENT_TYPE_CREATE_OBJECT
          - OBJECT_STORAGE_EVENT_TYPE_DELETE_OBJECT
          - OBJECT_STORAGE_EVENT_TYPE_UPDATE_OBJECT
          bucket_id: s3-for-trigger
          prefix: dev
          suffix: 12.jpg
        gateway_websocket_broadcast:
          gateway_id: d4eofc7n0mh2********
          path: /
          service_account_id: aje3932acdh2********
      status: ACTIVE
      ```

- API {#api}

  To update parameters of a trigger, use the [update](../../triggers/api-ref/Trigger/update.md) REST API method for the [Trigger](../../triggers/api-ref/Trigger/index.md) resource or the [TriggerService/Update](../../triggers/api-ref/grpc/Trigger/update.md) gRPC API call.

{% endlist %}