1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-08 10:35:03 +00:00
gcloud-help/gcloud/billing/projects/link
2023-08-23 10:30:46 +00:00

61 lines
2.3 KiB
Text

NAME
gcloud billing projects link - link a project with a billing account
SYNOPSIS
gcloud billing projects link PROJECT_ID --billing-account=ACCOUNT_ID
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
This command sets or updates the billing account associated with a project.
Billing is enabled on a project when the project is linked to a valid,
active Cloud Billing account. The billing account accrues charges for the
usage of resources in all of the linked projects. If the project is already
linked to a billing account, this command moves the project to the billing
account you specify, updating the billing account that is linked to the
project.
Note that associating a project with a closed billing account has the same
effect as disabling billing on the project: any paid resources in use by
the project are shut down, and your application stops functioning. Unless
you want to disable billing, you should always specify a valid, active
Cloud Billing account when you run this command. Learn how to confirm the
status of a Cloud Billing account at
https://cloud.google.com/billing/docs/how-to/verify-billing-enabled#billing_account_status
EXAMPLES
To link a billing account 0X0X0X-0X0X0X-0X0X0X with a project my-project,
run:
$ gcloud billing projects link my-project \
--billing-account=0X0X0X-0X0X0X-0X0X0X
POSITIONAL ARGUMENTS
PROJECT_ID
Specify a project id.
REQUIRED FLAGS
--billing-account=ACCOUNT_ID
Specify a billing account ID. Billing account IDs are of the form
0X0X0X-0X0X0X-0X0X0X. To see available IDs, run $ gcloud billing
accounts list.
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/v1/getting-started
NOTES
These variants are also available:
$ gcloud alpha billing projects link
$ gcloud beta billing projects link