Skip to main content

projects

Creates, updates, deletes, gets or lists a projects resource.

Overview

Nameprojects
TypeResource
Idgoogle.cloudbilling.projects

Fields

NameDatatypeDescription
namestringOutput only. The resource name for the ProjectBillingInfo; has the form projects/{project_id}/billingInfo. For example, the resource name for the billing information for project tokyo-rain-123 would be projects/tokyo-rain-123/billingInfo.
billingAccountNamestringThe resource name of the billing account associated with the project, if any. For example, billingAccounts/012345-567890-ABCDEF.
billingEnabledbooleanOutput only. True if the project is associated with an open billing account, to which usage on the project is charged. False if the project is associated with a closed billing account, or no billing account at all, and therefore cannot use paid services.
projectIdstringOutput only. The ID of the project that this ProjectBillingInfo represents, such as tokyo-rain-123. This is a convenience field so that you don't need to parse the name field to obtain a project ID.

Methods

NameAccessible byRequired ParamsDescription
listSELECTbillingAccountsIdLists the projects associated with a billing account. The current authenticated user must have the billing.resourceAssociations.list IAM permission, which is often given to billing account viewers.

SELECT examples

Lists the projects associated with a billing account. The current authenticated user must have the billing.resourceAssociations.list IAM permission, which is often given to billing account viewers.

SELECT
name,
billingAccountName,
billingEnabled,
projectId
FROM google.cloudbilling.projects
WHERE billingAccountsId = '{{ billingAccountsId }}';