- release_tracks: [ALPHA, GA]

  help_text:
    brief: Update a Cloud Security Command Center mute config.
    description: Update a Cloud Security Command Center mute config.
    examples: |
      Update a mute config with id ``my-test-mute-config'' under organization ``123'' with a filter on category that equals to XSS_SCRIPTING:

        $ {command} my-test-mute-config --organization=organizations/123 --description="This is a test mute config" --filter="category=\"XSS_SCRIPTING\""
        $ {command} my-test-mute-config --organization=123 --description="This is a test mute config" --filter="category=\"XSS_SCRIPTING\""
        $ {command} organizations/123/muteConfigs/my-test-mute-config --description="This is a test mute config" --filter="category=\"XSS_SCRIPTING\""

      Update a mute config with id ``my-test-mute-config'' under folder ``456'' with a filter on category that equals to XSS_SCRIPTING:

        $ {command} my-test-mute-config --folder=folders/456 --description="This is a test mute config" --filter="category=\"XSS_SCRIPTING\""
        $ {command} my-test-mute-config --folder=456 --description="This is a test mute config" --filter="category=\"XSS_SCRIPTING\""
        $ {command} folders/456/muteConfigs/my-test-mute-config --description="This is a test mute config" --filter="category=\"XSS_SCRIPTING\""

      Update a mute config with id ``my-test-mute-config'' under project ``789'' with a filter on category that equals to XSS_SCRIPTING:

        $ {command} my-test-mute-config --project=projects/789 --description="This is a test mute config" --filter="category=\"XSS_SCRIPTING\""
        $ {command} my-test-mute-config --project=789 --description="This is a test mute config" --filter="category=\"XSS_SCRIPTING\""
        $ {command} projects/789/muteConfigs/my-test-mute-config --description="This is a test mute config" --filter="category=\"XSS_SCRIPTING\""

  request:
    collection: securitycenter.organizations.muteConfigs
    disable_resource_check: true
    api_version: v1
    modify_request_hooks:
    - googlecloudsdk.command_lib.scc.muteconfigs.request_hooks:UpdateMuteConfigReqHook

  arguments:

    params:
    - arg_name: mute_config
      api_field: name
      is_positional: true
      required: true
      help_text: |
        ID of the mute config or the full resource name of the mute config.

    - group:
        mutex: true
        params:
        - arg_name: organization
          api_field: name
          help_text: |
            Organization where the mute config resides. Formatted as ``organizations/123'' or just ``123''.

        - arg_name: folder
          api_field: name
          help_text: |
            Folder where the mute config resides. Formatted as ``folders/456'' or just ``456''.

        - arg_name: project
          api_field: name
          help_text: |
            Project (id or number) where the mute config resides. Formatted as ``projects/789'' or just ``789''.

    - !REF googlecloudsdk.command_lib.scc.muteconfigs.flags:description
    - !REF googlecloudsdk.command_lib.scc.muteconfigs.flags:filter
    - arg_name: update-mask
      api_field: updateMask
      help_text: |
        Optional: If left unspecified (default), an update-mask is automatically created using the
        flags specified in the command and only those values are updated.
