Skip to main content

projects

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

Overview

Nameprojects
TypeResource
Idgoogle.cloudbilling.projects

Fields

The following fields are returned by SELECT queries:

Successful response

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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectbillingAccountsIdpageSize, pageTokenLists 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
billingAccountsIdstring
pageSizeinteger (int32)
pageTokenstring

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 }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';