File: //snap/google-cloud-cli/current/lib/surface/artifacts/repositories/get_iam_policy.yaml
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: |
Get IAM policy for an Artifact Registry repository.
description: |
*{command}* displays the IAM policy associated with an Artifact Registry repository.
The output includes an "etag" identifier that is used to check for concurrent policy
updates. An edited policy should include the same etag so that *set-iam-policy* applies
the changes to the correct policy version.
This command can fail for the following reasons:
* The repository specified does not exist.
* The active account does not have permission to access the given
repository's IAM policies.
examples: |
To print the IAM policy for repository `my-repo`, run:
$ {command} my-repo
request: &request
api_version: v1
collection: artifactregistry.projects.locations.repositories
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.artifacts.resources:repository_without_property
help_text: |
Name of the Artifact Registry repository.