class BillingAccounts extends Resource (View source)

The "billingAccounts" collection of methods.

Typical usage is:

 $cloudbillingService = new Google\Service\Cloudbilling(...);
 $billingAccounts = $cloudbillingService->billingAccounts;

Methods

create(BillingAccount $postBody, array $optParams = [])

This method creates billing subaccounts.

get(string $name, array $optParams = [])

Gets information about a billing account. The current authenticated user must be a viewer of the billing account.

getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a billing account. The caller must have the billing.accounts.getIamPolicy permission on the account, which is often given to billing account viewers. (billingAccounts.getIamPolicy)

listBillingAccounts(array $optParams = [])

Lists the billing accounts that the current authenticated user has permission to view.

move(string $name, MoveBillingAccountRequest $postBody, array $optParams = [])

Changes which parent organization a billing account belongs to.

patch(string $name, BillingAccount $postBody, array $optParams = [])

Updates a billing account's fields. Currently the only field that can be edited is display_name. The current authenticated user must have the billing.accounts.update IAM permission, which is typically given to the administrator of the billing account. (billingAccounts.patch)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy for a billing account. Replaces any existing policy. The caller must have the billing.accounts.setIamPolicy permission on the account, which is often given to billing account administrators. (billingAccounts.setIamPolicy)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.

Details

BillingAccount create(BillingAccount $postBody, array $optParams = [])

This method creates billing subaccounts.

Google Cloud resellers should use the Channel Services APIs, accounts.custom ers.create and accounts.customers.entitlements.create. When creating a subaccount, the current authenticated user must have the billing.accounts.update IAM permission on the parent account, which is typically given to billing account administrators. This method will return an error if the parent account has not been provisioned for subaccounts. (billingAccounts.create)

Parameters

BillingAccount $postBody
array $optParams

Optional parameters.

Return Value

BillingAccount

Exceptions

Exception

BillingAccount get(string $name, array $optParams = [])

Gets information about a billing account. The current authenticated user must be a viewer of the billing account.

(billingAccounts.get)

Parameters

string $name

Required. The resource name of the billing account to retrieve. For example, billingAccounts/012345-567890-ABCDEF.

array $optParams

Optional parameters.

Return Value

BillingAccount

Exceptions

Exception

Policy getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a billing account. The caller must have the billing.accounts.getIamPolicy permission on the account, which is often given to billing account viewers. (billingAccounts.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListBillingAccountsResponse listBillingAccounts(array $optParams = [])

Lists the billing accounts that the current authenticated user has permission to view.

(billingAccounts.listBillingAccounts)

Parameters

array $optParams

Optional parameters.

Return Value

ListBillingAccountsResponse

Exceptions

Exception

BillingAccount move(string $name, MoveBillingAccountRequest $postBody, array $optParams = [])

Changes which parent organization a billing account belongs to.

(billingAccounts.move)

Parameters

string $name

Required. The resource name of the billing account to move. Must be of the form billingAccounts/{billing_account_id}. The specified billing account cannot be a subaccount, since a subaccount always belongs to the same organization as its parent account.

MoveBillingAccountRequest $postBody
array $optParams

Optional parameters.

Return Value

BillingAccount

Exceptions

Exception

BillingAccount patch(string $name, BillingAccount $postBody, array $optParams = [])

Updates a billing account's fields. Currently the only field that can be edited is display_name. The current authenticated user must have the billing.accounts.update IAM permission, which is typically given to the administrator of the billing account. (billingAccounts.patch)

Parameters

string $name

Required. The name of the billing account resource to be updated.

BillingAccount $postBody
array $optParams

Optional parameters.

Return Value

BillingAccount

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy for a billing account. Replaces any existing policy. The caller must have the billing.accounts.setIamPolicy permission on the account, which is often given to billing account administrators. (billingAccounts.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Tests the access control policy for a billing account. This method takes the resource and a set of permissions as input and returns the subset of the input permissions that the caller is allowed for that resource.

(billingAccounts.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception