gcloud billing accounts set-iam-policy

NAME
gcloud billing accounts set-iam-policy - set the IAM policy for a Cloud Billing account
SYNOPSIS
gcloud billing accounts set-iam-policyACCOUNTPOLICY_FILE[GCLOUD_WIDE_FLAG]
DESCRIPTION
gcloud billing accounts set-iam-policy sets the IAM policy for aCloud Billing account given an account ID and a JSON or YAML file that describesthe IAM policy.

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

EXAMPLES
The following command reads an IAM policy defined in the JSON filepolicy.json and sets it for a Billing account ID123456-789876-543210:
gcloudbillingaccountsset-iam-policy123456-789876-543210policy.json

Seehttps://cloud.google.com/iam/docs/managing-policiesfor policy file format and content details.

POSITIONAL ARGUMENTS
Account resource - The Cloud Billing account for which to display the IAMpolicy. This represents a Cloud resource.

This must be specified.

ACCOUNT
ID of the account or fully qualified identifier for the account.

To set theaccount attribute:

  • provide the argumentaccount on the command line.
POLICY_FILE
Path to a local JSON or YAML formatted file containing a valid policy.

The output of theget-iam-policy command is a valid file, as is anyJSON or YAML file conforming to the structure of aPolicy.

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 thecloudbilling/v1 API. The full documentationfor this API can be found at:https://cloud.google.com/billing/docs/apis
NOTES
These variants are also available:
gcloudalphabillingaccountsset-iam-policy
gcloudbetabillingaccountsset-iam-policy

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.