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

public class 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 > ClientBase<CloudBilling.CloudBillingClient> > 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(ClientBase.ClientBaseConfiguration)

protected CloudBillingClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

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 as a reseller account.

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, Nullable<DateTime>, CancellationToken)

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

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 as a reseller account.

Parameters
NameDescription
requestCreateBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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 as a reseller account.

Parameters
NameDescription
requestCreateBillingAccountRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<BillingAccount>

The call object.

CreateBillingAccountAsync(CreateBillingAccountRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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 as a reseller account.

Parameters
NameDescription
requestCreateBillingAccountRequest

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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
AsyncUnaryCall<BillingAccount>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<BillingAccount>

The call object.

GetBillingAccountAsync(GetBillingAccountRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<BillingAccount>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

The call object.

GetIamPolicyAsync(GetIamPolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ProjectBillingInfo>

The call object.

GetProjectBillingInfoAsync(GetProjectBillingInfoRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ProjectBillingInfo>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ListBillingAccountsResponse>

The call object.

ListBillingAccountsAsync(ListBillingAccountsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ListBillingAccountsResponse>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ListProjectBillingInfoResponse>

The call object.

ListProjectBillingInfoAsync(ListProjectBillingInfoRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ListProjectBillingInfoResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
CloudBilling.CloudBillingClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Billing.V1.CloudBilling.CloudBillingClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

The call object.

SetIamPolicyAsync(SetIamPolicyRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<Policy>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<TestIamPermissionsResponse>

The call object.

TestIamPermissionsAsync(TestIamPermissionsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<TestIamPermissionsResponse>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<BillingAccount>

The call object.

UpdateBillingAccountAsync(UpdateBillingAccountRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<BillingAccount>

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, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ProjectBillingInfo>

The call object.

UpdateProjectBillingInfoAsync(UpdateProjectBillingInfoRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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.

deadlineNullable<DateTime>

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
AsyncUnaryCall<ProjectBillingInfo>

The call object.