Google Cloud Billing v1 API - Class CloudBilling.CloudBillingClient (3.8.0)

public class CloudBilling.CloudBillingClient : ClientBase<CloudBilling.CloudBillingClient>

Reference documentation and code samples for the Google Cloud Billing v1 API class CloudBilling.CloudBillingClient.

Client for CloudBilling

Inheritance

object > ClientBase > ClientBaseCloudBillingCloudBillingClient > CloudBilling.CloudBillingClient

Namespace

Google.Cloud.Billing.V1

Assembly

Google.Cloud.Billing.V1.dll

Constructors

CloudBillingClient()

protected CloudBillingClient()

Protected parameterless constructor to allow creation of test doubles.

CloudBillingClient(CallInvoker)

public CloudBillingClient(CallInvoker callInvoker)

Creates a new client for CloudBilling that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

CloudBillingClient(ChannelBase)

public CloudBillingClient(ChannelBase channel)

Creates a new client for CloudBilling

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

CloudBillingClient(ClientBaseConfiguration)

protected CloudBillingClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateBillingAccount(CreateBillingAccountRequest, CallOptions)

public virtual BillingAccount CreateBillingAccount(CreateBillingAccountRequest request, CallOptions options)

This method creates billing subaccounts.

Google Cloud resellers should use the Channel Services APIs, accounts.customers.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.

Parameters
Name Description
request CreateBillingAccountRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
BillingAccount

The response received from the server.

CreateBillingAccount(CreateBillingAccountRequest, Metadata, DateTime?, CancellationToken)

public virtual BillingAccount CreateBillingAccount(CreateBillingAccountRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

This method creates billing subaccounts.

Google Cloud resellers should use the Channel Services APIs, accounts.customers.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.

Parameters
Name Description
request CreateBillingAccountRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
BillingAccount

The response received from the server.

CreateBillingAccountAsync(CreateBillingAccountRequest, CallOptions)

public virtual AsyncUnaryCall<BillingAccount> CreateBillingAccountAsync(CreateBillingAccountRequest request, CallOptions options)

This method creates billing subaccounts.

Google Cloud resellers should use the Channel Services APIs, accounts.customers.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.

Parameters
Name Description
request CreateBillingAccountRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallBillingAccount

The call object.

CreateBillingAccountAsync(CreateBillingAccountRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<BillingAccount> CreateBillingAccountAsync(CreateBillingAccountRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

This method creates billing subaccounts.

Google Cloud resellers should use the Channel Services APIs, accounts.customers.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.

Parameters
Name Description
request CreateBillingAccountRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallBillingAccount

The call object.

GetBillingAccount(GetBillingAccountRequest, CallOptions)

public virtual BillingAccount GetBillingAccount(GetBillingAccountRequest request, CallOptions options)

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

Parameters
Name Description
request GetBillingAccountRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
BillingAccount

The response received from the server.

GetBillingAccount(GetBillingAccountRequest, Metadata, DateTime?, CancellationToken)

public virtual BillingAccount GetBillingAccount(GetBillingAccountRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request GetBillingAccountRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
BillingAccount

The response received from the server.

GetBillingAccountAsync(GetBillingAccountRequest, CallOptions)

public virtual AsyncUnaryCall<BillingAccount> GetBillingAccountAsync(GetBillingAccountRequest request, CallOptions options)

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

Parameters
Name Description
request GetBillingAccountRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallBillingAccount

The call object.

GetBillingAccountAsync(GetBillingAccountRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<BillingAccount> GetBillingAccountAsync(GetBillingAccountRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request GetBillingAccountRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallBillingAccount

The call object.

GetIamPolicy(GetIamPolicyRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallOptions options)

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.

Parameters
Name Description
request GetIamPolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Policy

The response received from the server.

GetIamPolicy(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request GetIamPolicyRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Policy

The response received from the server.

GetIamPolicyAsync(GetIamPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallOptions options)

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.

Parameters
Name Description
request GetIamPolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

GetIamPolicyAsync(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request GetIamPolicyRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

GetProjectBillingInfo(GetProjectBillingInfoRequest, CallOptions)

public virtual ProjectBillingInfo GetProjectBillingInfo(GetProjectBillingInfoRequest request, CallOptions options)

Gets the billing information for a project. The current authenticated user must have the resourcemanager.projects.get permission for the project, which can be granted by assigning the Project Viewer role.

Parameters
Name Description
request GetProjectBillingInfoRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ProjectBillingInfo

The response received from the server.

GetProjectBillingInfo(GetProjectBillingInfoRequest, Metadata, DateTime?, CancellationToken)

public virtual ProjectBillingInfo GetProjectBillingInfo(GetProjectBillingInfoRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the billing information for a project. The current authenticated user must have the resourcemanager.projects.get permission for the project, which can be granted by assigning the Project Viewer role.

Parameters
Name Description
request GetProjectBillingInfoRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ProjectBillingInfo

The response received from the server.

GetProjectBillingInfoAsync(GetProjectBillingInfoRequest, CallOptions)

public virtual AsyncUnaryCall<ProjectBillingInfo> GetProjectBillingInfoAsync(GetProjectBillingInfoRequest request, CallOptions options)

Gets the billing information for a project. The current authenticated user must have the resourcemanager.projects.get permission for the project, which can be granted by assigning the Project Viewer role.

Parameters
Name Description
request GetProjectBillingInfoRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallProjectBillingInfo

The call object.

GetProjectBillingInfoAsync(GetProjectBillingInfoRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ProjectBillingInfo> GetProjectBillingInfoAsync(GetProjectBillingInfoRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the billing information for a project. The current authenticated user must have the resourcemanager.projects.get permission for the project, which can be granted by assigning the Project Viewer role.

Parameters
Name Description
request GetProjectBillingInfoRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallProjectBillingInfo

The call object.

ListBillingAccounts(ListBillingAccountsRequest, CallOptions)

public virtual ListBillingAccountsResponse ListBillingAccounts(ListBillingAccountsRequest request, CallOptions options)

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

Parameters
Name Description
request ListBillingAccountsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListBillingAccountsResponse

The response received from the server.

ListBillingAccounts(ListBillingAccountsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListBillingAccountsResponse ListBillingAccounts(ListBillingAccountsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request ListBillingAccountsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ListBillingAccountsResponse

The response received from the server.

ListBillingAccountsAsync(ListBillingAccountsRequest, CallOptions)

public virtual AsyncUnaryCall<ListBillingAccountsResponse> ListBillingAccountsAsync(ListBillingAccountsRequest request, CallOptions options)

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

Parameters
Name Description
request ListBillingAccountsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListBillingAccountsResponse

The call object.

ListBillingAccountsAsync(ListBillingAccountsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListBillingAccountsResponse> ListBillingAccountsAsync(ListBillingAccountsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request ListBillingAccountsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListBillingAccountsResponse

The call object.

ListProjectBillingInfo(ListProjectBillingInfoRequest, CallOptions)

public virtual ListProjectBillingInfoResponse ListProjectBillingInfo(ListProjectBillingInfoRequest request, CallOptions options)

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
Name Description
request ListProjectBillingInfoRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListProjectBillingInfoResponse

The response received from the server.

ListProjectBillingInfo(ListProjectBillingInfoRequest, Metadata, DateTime?, CancellationToken)

public virtual ListProjectBillingInfoResponse ListProjectBillingInfo(ListProjectBillingInfoRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
Name Description
request ListProjectBillingInfoRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ListProjectBillingInfoResponse

The response received from the server.

ListProjectBillingInfoAsync(ListProjectBillingInfoRequest, CallOptions)

public virtual AsyncUnaryCall<ListProjectBillingInfoResponse> ListProjectBillingInfoAsync(ListProjectBillingInfoRequest request, CallOptions options)

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
Name Description
request ListProjectBillingInfoRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListProjectBillingInfoResponse

The call object.

ListProjectBillingInfoAsync(ListProjectBillingInfoRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListProjectBillingInfoResponse> ListProjectBillingInfoAsync(ListProjectBillingInfoRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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
Name Description
request ListProjectBillingInfoRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListProjectBillingInfoResponse

The call object.

MoveBillingAccount(MoveBillingAccountRequest, CallOptions)

public virtual BillingAccount MoveBillingAccount(MoveBillingAccountRequest request, CallOptions options)

Changes which parent organization a billing account belongs to.

Parameters
Name Description
request MoveBillingAccountRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
BillingAccount

The response received from the server.

MoveBillingAccount(MoveBillingAccountRequest, Metadata, DateTime?, CancellationToken)

public virtual BillingAccount MoveBillingAccount(MoveBillingAccountRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Changes which parent organization a billing account belongs to.

Parameters
Name Description
request MoveBillingAccountRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
BillingAccount

The response received from the server.

MoveBillingAccountAsync(MoveBillingAccountRequest, CallOptions)

public virtual AsyncUnaryCall<BillingAccount> MoveBillingAccountAsync(MoveBillingAccountRequest request, CallOptions options)

Changes which parent organization a billing account belongs to.

Parameters
Name Description
request MoveBillingAccountRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallBillingAccount

The call object.

MoveBillingAccountAsync(MoveBillingAccountRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<BillingAccount> MoveBillingAccountAsync(MoveBillingAccountRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Changes which parent organization a billing account belongs to.

Parameters
Name Description
request MoveBillingAccountRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallBillingAccount

The call object.

NewInstance(ClientBaseConfiguration)

protected override CloudBilling.CloudBillingClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
CloudBillingCloudBillingClient
Overrides

SetIamPolicy(SetIamPolicyRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallOptions options)

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.

Parameters
Name Description
request SetIamPolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Policy

The response received from the server.

SetIamPolicy(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request SetIamPolicyRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Policy

The response received from the server.

SetIamPolicyAsync(SetIamPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallOptions options)

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.

Parameters
Name Description
request SetIamPolicyRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

SetIamPolicyAsync(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request SetIamPolicyRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallPolicy

The call object.

TestIamPermissions(TestIamPermissionsRequest, CallOptions)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallOptions options)

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.

Parameters
Name Description
request TestIamPermissionsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
TestIamPermissionsResponse

The response received from the server.

TestIamPermissions(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request TestIamPermissionsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
TestIamPermissionsResponse

The response received from the server.

TestIamPermissionsAsync(TestIamPermissionsRequest, CallOptions)

public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallOptions options)

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.

Parameters
Name Description
request TestIamPermissionsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallTestIamPermissionsResponse

The call object.

TestIamPermissionsAsync(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request TestIamPermissionsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallTestIamPermissionsResponse

The call object.

UpdateBillingAccount(UpdateBillingAccountRequest, CallOptions)

public virtual BillingAccount UpdateBillingAccount(UpdateBillingAccountRequest request, CallOptions options)

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.

Parameters
Name Description
request UpdateBillingAccountRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
BillingAccount

The response received from the server.

UpdateBillingAccount(UpdateBillingAccountRequest, Metadata, DateTime?, CancellationToken)

public virtual BillingAccount UpdateBillingAccount(UpdateBillingAccountRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request UpdateBillingAccountRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
BillingAccount

The response received from the server.

UpdateBillingAccountAsync(UpdateBillingAccountRequest, CallOptions)

public virtual AsyncUnaryCall<BillingAccount> UpdateBillingAccountAsync(UpdateBillingAccountRequest request, CallOptions options)

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.

Parameters
Name Description
request UpdateBillingAccountRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallBillingAccount

The call object.

UpdateBillingAccountAsync(UpdateBillingAccountRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<BillingAccount> UpdateBillingAccountAsync(UpdateBillingAccountRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

Parameters
Name Description
request UpdateBillingAccountRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallBillingAccount

The call object.

UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest, CallOptions)

public virtual ProjectBillingInfo UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest request, CallOptions options)

Sets or updates the billing account associated with a project. You specify the new billing account by setting the billing_account_name in the ProjectBillingInfo resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges.

Note: Incurred charges that have not yet been reported in the transaction history of the Google Cloud Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.

The current authenticated user must have ownership privileges for both the project and the billing account.

You can disable billing on the project by setting the billing_account_name field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project.

Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.

Parameters
Name Description
request UpdateProjectBillingInfoRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ProjectBillingInfo

The response received from the server.

UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest, Metadata, DateTime?, CancellationToken)

public virtual ProjectBillingInfo UpdateProjectBillingInfo(UpdateProjectBillingInfoRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets or updates the billing account associated with a project. You specify the new billing account by setting the billing_account_name in the ProjectBillingInfo resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges.

Note: Incurred charges that have not yet been reported in the transaction history of the Google Cloud Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.

The current authenticated user must have ownership privileges for both the project and the billing account.

You can disable billing on the project by setting the billing_account_name field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project.

Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.

Parameters
Name Description
request UpdateProjectBillingInfoRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ProjectBillingInfo

The response received from the server.

UpdateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest, CallOptions)

public virtual AsyncUnaryCall<ProjectBillingInfo> UpdateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest request, CallOptions options)

Sets or updates the billing account associated with a project. You specify the new billing account by setting the billing_account_name in the ProjectBillingInfo resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges.

Note: Incurred charges that have not yet been reported in the transaction history of the Google Cloud Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.

The current authenticated user must have ownership privileges for both the project and the billing account.

You can disable billing on the project by setting the billing_account_name field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project.

Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.

Parameters
Name Description
request UpdateProjectBillingInfoRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallProjectBillingInfo

The call object.

UpdateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ProjectBillingInfo> UpdateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets or updates the billing account associated with a project. You specify the new billing account by setting the billing_account_name in the ProjectBillingInfo resource to the resource name of a billing account. Associating a project with an open billing account enables billing on the project and allows charges for resource usage. If the project already had a billing account, this method changes the billing account used for resource usage charges.

Note: Incurred charges that have not yet been reported in the transaction history of the Google Cloud Console might be billed to the new billing account, even if the charge occurred before the new billing account was assigned to the project.

The current authenticated user must have ownership privileges for both the project and the billing account.

You can disable billing on the project by setting the billing_account_name field to empty. This action disassociates the current billing account from the project. Any billable activity of your in-use services will stop, and your application could stop functioning as expected. Any unbilled charges to date will be billed to the previously associated account. The current authenticated user must be either an owner of the project or an owner of the billing account for the project.

Note that associating a project with a closed billing account will have much the same effect as disabling billing on the project: any paid resources used by the project will be shut down. Thus, unless you wish to disable billing, you should always call this method with the name of an open billing account.

Parameters
Name Description
request UpdateProjectBillingInfoRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallProjectBillingInfo

The call object.