Google Cloud Billing v1 API - Class CloudBilling.CloudBillingClient (3.7.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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

CloudBillingClient(ChannelBase)

public CloudBillingClient(ChannelBase channel)

Creates a new client for CloudBilling

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

CloudBillingClient(ClientBaseConfiguration)

protected CloudBillingClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

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
NameDescription
requestCreateBillingAccountRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestCreateBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestCreateBillingAccountRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestCreateBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetBillingAccountRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetBillingAccountRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetProjectBillingInfoRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetProjectBillingInfoRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestGetProjectBillingInfoRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestGetProjectBillingInfoRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestListBillingAccountsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListBillingAccountsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestListBillingAccountsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListBillingAccountsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestListProjectBillingInfoRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListProjectBillingInfoRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestListProjectBillingInfoRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestListProjectBillingInfoRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestMoveBillingAccountRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestMoveBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestMoveBillingAccountRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestMoveBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallBillingAccount

The call object.

NewInstance(ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
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
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestUpdateBillingAccountRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestUpdateBillingAccountRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestUpdateProjectBillingInfoRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateProjectBillingInfoRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestUpdateProjectBillingInfoRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateProjectBillingInfoRequest

The request to send to the server.

headersMetadata

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

deadlineDateTime

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallProjectBillingInfo

The call object.