HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/lib/surface/artifacts/versions/update.yaml
- release_tracks: [GA]
  help_text:
    brief: |
      Update annotations on an Artifact Registry package version.
    description: |
      Update annotations on an Artifact Registry package version.

    examples: |
      To update annotations on version `1.0.0` of `my-pkg` when the project ID, repository and location defaults are set, run the following command:

      CAUTION: This command will overwrite any existing annotations on the version.

          $ {command} 1.0.0 --package=my-pkg --annotations=key1=value1,key2=value2

      To clear all annotations on the version run the following command:

          $ {command} 1.0.0 --package=my-pkg --annotations={}

  arguments:
    resource:
      spec: !REF googlecloudsdk.command_lib.artifacts.resources:version
      help_text: |
        The Artifact Registry package version to update.
    params:
    - arg_name: annotations
      api_field: version.annotations
      required: false
      help_text: |
        List of annotations in the format of KEY=VALUE pairs to add, update, or remove.
        Duplicate keys will be overwritten. For more details on annotations,
        see https://google.aip.dev/148#annotations.
      spec:
      - api_field: key
      - api_field: value

  request: &request
    api_version: v1
    collection: artifactregistry.projects.locations.repositories.packages.versions
    modify_request_hooks:
    - googlecloudsdk.command_lib.artifacts.util:EscapeVersionNameHook