- NAME
-
- gcloud billing accounts set-iam-policy - set the IAM policy for a Cloud Billing account
- SYNOPSIS
-
-
gcloud billing accounts set-iam-policy
ACCOUNT
POLICY_FILE
[GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
gcloud 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 ID123456-789876-543210
:gcloud 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.
-
provide the argument
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.
-
Account resource - The Cloud Billing account for which to display the IAM
policy. 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 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/docs/apis - NOTES
-
These variants are also available:
gcloud alpha billing accounts set-iam-policy
gcloud beta billing accounts set-iam-policy
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.