GCLOUD_IAM_SERVICE-ACCOUNTS_GET-IAM-POLICY(1)

NAME

gcloud iam service-accounts get-iam-policy - get the IAM policy for a service account

SYNOPSIS

gcloud iam service-accounts get-iam-policy IAM-ACCOUNT [GLOBAL-FLAG ...]

DESCRIPTION
This command gets the IAM policy for a service account. If formatted as JSON, the output can be edited and used as a policy file for set-iam-policy. The output includes an "etag" field identifying the version emitted and allowing detection of concurrent policy updates; see $ gcloud iam service-accounts set-iam-policy for additional details.

POSITIONAL ARGUMENTS

    IAM-ACCOUNT
        The service account whose policy to get.

GLOBAL FLAGS
Run $ gcloud help for a description of flags available to all commands.

EXAMPLES
To print the IAM policy for a given service account, run:
    $ gcloud iam service-accounts get-iam-policy \
        my-iam-account@somedomain.com