projects
Creates, updates, deletes, gets or lists a projects
resource.
Overview
Name | projects |
Type | Resource |
Id | google.cloudbilling.projects |
Fields
The following fields are returned by SELECT
queries:
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output 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 . |
billingAccountName | string | The resource name of the billing account associated with the project, if any. For example, billingAccounts/012345-567890-ABCDEF . |
billingEnabled | boolean | Output 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. |
projectId | string | Output 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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | billingAccountsId | pageSize , pageToken | 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. |
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.
Name | Datatype | Description |
---|---|---|
billingAccountsId | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- list
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 }}';