- release_tracks: [ALPHA, BETA, GA]

  help_text:
    brief: |
      Update an Artifact Registry tag.
    description: |
      Update an Artifact Registry tag.

      This command can fail for the following reasons:
        * The tag does not exist.
        * The specified version or package does not exist.
        * The active account does not have permission to update tags.
        * The specified package format doesn't support tag operations (e.g. maven).
    examples: |
      To update a tag with the name `my-tag` to version `1.0.0` of package `my-pkg`
      from another version, run:

        $ {command} my-tag --version=1.0.0 --package=my-pkg

  arguments:
    resource:
      spec: !REF googlecloudsdk.command_lib.artifacts.resources:tag
      help_text: |
        The Artifact Registry tag to update.
    params:
    - arg_name: version
      required: true
      help_text: |
        The version associated with the tag.

  request:
    api_version: v1
    collection: artifactregistry.projects.locations.repositories.packages.tags
    modify_request_hooks:
    - googlecloudsdk.command_lib.artifacts.util:SetTagUpdateMask
