NAME

gcloud beta billing accounts set-iam-policy - set the IAM policy for a Cloud Billing account

SYNOPSIS

gcloud beta billing accounts set-iam-policy ACCOUNT POLICY_FILE [GCLOUD_WIDE_FLAG ...]

DESCRIPTION

(BETA) gcloud beta billing accounts set-iam-policy sets the IAM policy for a Cloud Billing account given an account ID and a JSON or YAML file that describes the IAM policy.

Note: Setting the IAM policy for a Cloud Billing account replaces existing IAM bindings for that account.

EXAMPLES

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 beta billing accounts set-iam-policy 123456-789876-543210 \ policy.json

See https://cloud.google.com/iam/docs/managing-policies for policy file format and content details.

POSITIONAL ARGUMENTS

Account resource - The Cloud Billing account for which to display the IAM

policy. This represents a Cloud resource.

This must be specified.

ACCOUNT

ID of the account or fully qualified identifier for the account. To set the account attribute:

  • provide the argument account on the command line.

POLICY_FILE

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 https://cloud.google.com/iam/reference/rest/v1/Policy.

GCLOUD WIDE FLAGS

These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

API REFERENCE

This command uses the cloudbilling/v1 API. The full documentation for this API can be found at: https://cloud.google.com/billing/

NOTES

This command is currently in beta and might change without notice. This variant is also available:

$ gcloud alpha billing accounts set-iam-policy