gcloud billing accounts set-iam-policy Stay organized with collections Save and categorize content based on your preferences.
- 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-policysets 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 file
policy.jsonand sets it for a Billing account ID123456-789876-543210:gcloudbillingaccountsset-iam-policy123456-789876-543210policy.jsonSeehttps://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 the
accountattribute:- provide the argument
accounton the command line.
- provide the argument
POLICY_FILE- Path to a local JSON or YAML formatted file containing a valid policy.
The output of the
get-iam-policycommand is a valid file, as is anyJSON or YAML file conforming to the structure of aPolicy.
- Account resource - The Cloud Billing account for which to display the IAMpolicy. This represents a Cloud resource.
- 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 helpfor details. - API REFERENCE
- This command uses the
cloudbilling/v1API. The full documentationfor this API can be found at:https://cloud.google.com/billing/docs/apis - NOTES
- These variants are also available:
gcloudalphabillingaccountsset-iam-policygcloudbetabillingaccountsset-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.