Cloud Billing Budget v1 API - Class BudgetService.BudgetServiceClient (2.4.0)

public class BudgetService.BudgetServiceClient : ClientBase<BudgetService.BudgetServiceClient>

Reference documentation and code samples for the Cloud Billing Budget v1 API class BudgetService.BudgetServiceClient.

Client for BudgetService

Inheritance

object > ClientBase > ClientBaseBudgetServiceBudgetServiceClient > BudgetService.BudgetServiceClient

Namespace

Google.Cloud.Billing.Budgets.V1

Assembly

Google.Cloud.Billing.Budgets.V1.dll

Constructors

BudgetServiceClient()

protected BudgetServiceClient()

Protected parameterless constructor to allow creation of test doubles.

BudgetServiceClient(CallInvoker)

public BudgetServiceClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

BudgetServiceClient(ChannelBase)

public BudgetServiceClient(ChannelBase channel)

Creates a new client for BudgetService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

BudgetServiceClient(ClientBaseConfiguration)

protected BudgetServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateBudget(CreateBudgetRequest, CallOptions)

public virtual Budget CreateBudget(CreateBudgetRequest request, CallOptions options)

Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.

Parameters
NameDescription
requestCreateBudgetRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Budget

The response received from the server.

CreateBudget(CreateBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual Budget CreateBudget(CreateBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.

Parameters
NameDescription
requestCreateBudgetRequest

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
Budget

The response received from the server.

CreateBudgetAsync(CreateBudgetRequest, CallOptions)

public virtual AsyncUnaryCall<Budget> CreateBudgetAsync(CreateBudgetRequest request, CallOptions options)

Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.

Parameters
NameDescription
requestCreateBudgetRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallBudget

The call object.

CreateBudgetAsync(CreateBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Budget> CreateBudgetAsync(CreateBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new budget. See Quotas and limits for more information on the limits of the number of budgets you can create.

Parameters
NameDescription
requestCreateBudgetRequest

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
AsyncUnaryCallBudget

The call object.

DeleteBudget(DeleteBudgetRequest, CallOptions)

public virtual Empty DeleteBudget(DeleteBudgetRequest request, CallOptions options)

Deletes a budget. Returns successfully if already deleted.

Parameters
NameDescription
requestDeleteBudgetRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteBudget(DeleteBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteBudget(DeleteBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a budget. Returns successfully if already deleted.

Parameters
NameDescription
requestDeleteBudgetRequest

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
Empty

The response received from the server.

DeleteBudgetAsync(DeleteBudgetRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteBudgetAsync(DeleteBudgetRequest request, CallOptions options)

Deletes a budget. Returns successfully if already deleted.

Parameters
NameDescription
requestDeleteBudgetRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteBudgetAsync(DeleteBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteBudgetAsync(DeleteBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a budget. Returns successfully if already deleted.

Parameters
NameDescription
requestDeleteBudgetRequest

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
AsyncUnaryCallEmpty

The call object.

GetBudget(GetBudgetRequest, CallOptions)

public virtual Budget GetBudget(GetBudgetRequest request, CallOptions options)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
NameDescription
requestGetBudgetRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Budget

The response received from the server.

GetBudget(GetBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual Budget GetBudget(GetBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
NameDescription
requestGetBudgetRequest

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
Budget

The response received from the server.

GetBudgetAsync(GetBudgetRequest, CallOptions)

public virtual AsyncUnaryCall<Budget> GetBudgetAsync(GetBudgetRequest request, CallOptions options)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
NameDescription
requestGetBudgetRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallBudget

The call object.

GetBudgetAsync(GetBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Budget> GetBudgetAsync(GetBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
NameDescription
requestGetBudgetRequest

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
AsyncUnaryCallBudget

The call object.

ListBudgets(ListBudgetsRequest, CallOptions)

public virtual ListBudgetsResponse ListBudgets(ListBudgetsRequest request, CallOptions options)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
NameDescription
requestListBudgetsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListBudgetsResponse

The response received from the server.

ListBudgets(ListBudgetsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListBudgetsResponse ListBudgets(ListBudgetsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
NameDescription
requestListBudgetsRequest

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
ListBudgetsResponse

The response received from the server.

ListBudgetsAsync(ListBudgetsRequest, CallOptions)

public virtual AsyncUnaryCall<ListBudgetsResponse> ListBudgetsAsync(ListBudgetsRequest request, CallOptions options)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
NameDescription
requestListBudgetsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListBudgetsResponse

The call object.

ListBudgetsAsync(ListBudgetsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListBudgetsResponse> ListBudgetsAsync(ListBudgetsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns a list of budgets for a billing account.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. When reading from the API, you will not see these fields in the return value, though they may have been set in the Cloud Console.

Parameters
NameDescription
requestListBudgetsRequest

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
AsyncUnaryCallListBudgetsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override BudgetService.BudgetServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
BudgetServiceBudgetServiceClient
Overrides

UpdateBudget(UpdateBudgetRequest, CallOptions)

public virtual Budget UpdateBudget(UpdateBudgetRequest request, CallOptions options)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.

Parameters
NameDescription
requestUpdateBudgetRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Budget

The response received from the server.

UpdateBudget(UpdateBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual Budget UpdateBudget(UpdateBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.

Parameters
NameDescription
requestUpdateBudgetRequest

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
Budget

The response received from the server.

UpdateBudgetAsync(UpdateBudgetRequest, CallOptions)

public virtual AsyncUnaryCall<Budget> UpdateBudgetAsync(UpdateBudgetRequest request, CallOptions options)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.

Parameters
NameDescription
requestUpdateBudgetRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallBudget

The call object.

UpdateBudgetAsync(UpdateBudgetRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Budget> UpdateBudgetAsync(UpdateBudgetRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a budget and returns the updated budget.

WARNING: There are some fields exposed on the Google Cloud Console that aren't available on this API. Budget fields that are not exposed in this API will not be changed by this method.

Parameters
NameDescription
requestUpdateBudgetRequest

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
AsyncUnaryCallBudget

The call object.