1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-16 12:22:03 +00:00
gcloud-help/gcloud/alpha/billing/accounts/set-iam-policy
2023-08-23 10:30:46 +00:00

67 lines
2.4 KiB
Text

NAME
gcloud alpha billing accounts set-iam-policy - set the IAM policy for a
Cloud Billing account
SYNOPSIS
gcloud alpha billing accounts set-iam-policy ACCOUNT POLICY_FILE
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) gcloud alpha 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 alpha 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/docs/apis
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist. These variants are also available:
$ gcloud billing accounts set-iam-policy
$ gcloud beta billing accounts set-iam-policy