- gcloud alpha billing accounts set-iam-policy - set the IAM policy for a Cloud Billing account
gcloud alpha billing accounts set-iam-policy ACCOUNT POLICY_FILE [GCLOUD_WIDE_FLAG ...]
(ALPHA) gcloud alpha billing accounts set-iam-policy sets the IAM
Account resource - The Cloud Billing account for which to display the IAM
policy. This represents a Cloud resource. This must be specified.
ID of the account or fully qualified identifier for the account.
Path to a local JSON or YAML formatted file containing a valid policy.
The output of the get-iam-policy command is a valid file, as is any JSON or YAML file conforming to the structure of a Policy (cloud.google.com/iam/reference/rest/v1/Policy
- Account resource - The Cloud Billing account for which to display the IAM policy. This represents a Cloud resource. This must be specified.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
This command uses the cloudbilling/v1 API. The full documentation for this API can be found at: cloud.google.com/billing
The following command reads an IAM policy defined in the JSON file policy.json and sets it for a Billing account ID 123456-789876-543210:
$ gcloud alpha billing accounts set-iam-policy \
See cloud.google.com/iam/docs/managing-policies for policy file format and content details.
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support This variant is also available:
- $ gcloud beta billing accounts set-iam-policy