- release_tracks: [ALPHA, BETA, GA]

  help_text:
    brief: |
      Create an Artifact Registry tag.
    description: |
      Create a new Artifact Registry tag.

      This command can fail for the following reasons:
        * A tag with the same name already exists.
        * The specified version or package does not exist.
        * The active account does not have permission to create tags.
        * The specified package format doesn't support tag operations (e.g. maven).
    examples: |
      To create a tag with the name `my-tag` for version `1.0.0` of package `my-pkg`
      under the current project, repository, and location, 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 create.
    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:AppendTagDataToRequest
