gcloud alpha billing projects link

NAME
gcloud alpha billing projects link - link a project with a billing account
SYNOPSIS
gcloud alpha billing projects link PROJECT_ID (--account-id=ACCOUNT_ID     | --billing-account=ACCOUNT_ID) [GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) 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 alpha billing projects link my-project --billing-account=0X0X0X-0X0X0X-0X0X0X
POSITIONAL ARGUMENTS
PROJECT_ID
Specify a project id.
REQUIRED FLAGS
Exactly one of these must be specified:
--account-id=ACCOUNT_ID
(DEPRECATED) Specify a billing account ID. Billing account IDs are of the form 0X0X0X-0X0X0X-0X0X0X. To see available IDs, run $ gcloud billing accounts list.

The --account-id flag has been renamed --billing-account.

--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
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 projects link
gcloud beta billing projects link