Class ServiceUsage.ServiceUsageClient (1.2.0)

public class ServiceUsageClient : ClientBase<ServiceUsage.ServiceUsageClient>

Client for ServiceUsage

Inheritance

Object > ClientBase > ClientBase<ServiceUsage.ServiceUsageClient> > ServiceUsage.ServiceUsageClient

Namespace

Google.Cloud.ServiceUsage.V1

Assembly

Google.Cloud.ServiceUsage.V1.dll

Constructors

ServiceUsageClient()

protected ServiceUsageClient()

Protected parameterless constructor to allow creation of test doubles.

ServiceUsageClient(CallInvoker)

public ServiceUsageClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ServiceUsageClient(ChannelBase)

public ServiceUsageClient(ChannelBase channel)

Creates a new client for ServiceUsage

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ServiceUsageClient(ClientBase.ClientBaseConfiguration)

protected ServiceUsageClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

BatchEnableServices(BatchEnableServicesRequest, CallOptions)

public virtual Operation BatchEnableServices(BatchEnableServicesRequest request, CallOptions options)

Enable multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. To enable a single service, use the EnableService method instead.

Parameters
NameDescription
requestBatchEnableServicesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

BatchEnableServices(BatchEnableServicesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation BatchEnableServices(BatchEnableServicesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Enable multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. To enable a single service, use the EnableService method instead.

Parameters
NameDescription
requestBatchEnableServicesRequest

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
Operation

The response received from the server.

BatchEnableServicesAsync(BatchEnableServicesRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> BatchEnableServicesAsync(BatchEnableServicesRequest request, CallOptions options)

Enable multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. To enable a single service, use the EnableService method instead.

Parameters
NameDescription
requestBatchEnableServicesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

BatchEnableServicesAsync(BatchEnableServicesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> BatchEnableServicesAsync(BatchEnableServicesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Enable multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. To enable a single service, use the EnableService method instead.

Parameters
NameDescription
requestBatchEnableServicesRequest

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<Operation>

The call object.

BatchGetServices(BatchGetServicesRequest, CallOptions)

public virtual BatchGetServicesResponse BatchGetServices(BatchGetServicesRequest request, CallOptions options)

Returns the service configurations and enabled states for a given list of services.

Parameters
NameDescription
requestBatchGetServicesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
BatchGetServicesResponse

The response received from the server.

BatchGetServices(BatchGetServicesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual BatchGetServicesResponse BatchGetServices(BatchGetServicesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Returns the service configurations and enabled states for a given list of services.

Parameters
NameDescription
requestBatchGetServicesRequest

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
BatchGetServicesResponse

The response received from the server.

BatchGetServicesAsync(BatchGetServicesRequest, CallOptions)

public virtual AsyncUnaryCall<BatchGetServicesResponse> BatchGetServicesAsync(BatchGetServicesRequest request, CallOptions options)

Returns the service configurations and enabled states for a given list of services.

Parameters
NameDescription
requestBatchGetServicesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<BatchGetServicesResponse>

The call object.

BatchGetServicesAsync(BatchGetServicesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<BatchGetServicesResponse> BatchGetServicesAsync(BatchGetServicesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Returns the service configurations and enabled states for a given list of services.

Parameters
NameDescription
requestBatchGetServicesRequest

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<BatchGetServicesResponse>

The call object.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
Operations.OperationsClient

A new Operations client for the same target as this client.

DisableService(DisableServiceRequest, CallOptions)

public virtual Operation DisableService(DisableServiceRequest request, CallOptions options)

Disable a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks.

It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a FAILED_PRECONDITION status if the target service is not currently enabled.

Parameters
NameDescription
requestDisableServiceRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

DisableService(DisableServiceRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation DisableService(DisableServiceRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Disable a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks.

It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a FAILED_PRECONDITION status if the target service is not currently enabled.

Parameters
NameDescription
requestDisableServiceRequest

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
Operation

The response received from the server.

DisableServiceAsync(DisableServiceRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> DisableServiceAsync(DisableServiceRequest request, CallOptions options)

Disable a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks.

It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a FAILED_PRECONDITION status if the target service is not currently enabled.

Parameters
NameDescription
requestDisableServiceRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

DisableServiceAsync(DisableServiceRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> DisableServiceAsync(DisableServiceRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Disable a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks.

It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a FAILED_PRECONDITION status if the target service is not currently enabled.

Parameters
NameDescription
requestDisableServiceRequest

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<Operation>

The call object.

EnableService(EnableServiceRequest, CallOptions)

public virtual Operation EnableService(EnableServiceRequest request, CallOptions options)

Enable a service so that it can be used with a project.

Parameters
NameDescription
requestEnableServiceRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

EnableService(EnableServiceRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Operation EnableService(EnableServiceRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Enable a service so that it can be used with a project.

Parameters
NameDescription
requestEnableServiceRequest

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
Operation

The response received from the server.

EnableServiceAsync(EnableServiceRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> EnableServiceAsync(EnableServiceRequest request, CallOptions options)

Enable a service so that it can be used with a project.

Parameters
NameDescription
requestEnableServiceRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Operation>

The call object.

EnableServiceAsync(EnableServiceRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Operation> EnableServiceAsync(EnableServiceRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Enable a service so that it can be used with a project.

Parameters
NameDescription
requestEnableServiceRequest

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<Operation>

The call object.

GetService(GetServiceRequest, CallOptions)

public virtual Service GetService(GetServiceRequest request, CallOptions options)

Returns the service configuration and enabled state for a given service.

Parameters
NameDescription
requestGetServiceRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Service

The response received from the server.

GetService(GetServiceRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Service GetService(GetServiceRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Returns the service configuration and enabled state for a given service.

Parameters
NameDescription
requestGetServiceRequest

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
Service

The response received from the server.

GetServiceAsync(GetServiceRequest, CallOptions)

public virtual AsyncUnaryCall<Service> GetServiceAsync(GetServiceRequest request, CallOptions options)

Returns the service configuration and enabled state for a given service.

Parameters
NameDescription
requestGetServiceRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Service>

The call object.

GetServiceAsync(GetServiceRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Service> GetServiceAsync(GetServiceRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Returns the service configuration and enabled state for a given service.

Parameters
NameDescription
requestGetServiceRequest

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<Service>

The call object.

ListServices(ListServicesRequest, CallOptions)

public virtual ListServicesResponse ListServices(ListServicesRequest request, CallOptions options)

List all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the servicemanagement.services.bind permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project.

WARNING: If you need to query enabled services frequently or across an organization, you should use Cloud Asset Inventory API, which provides higher throughput and richer filtering capability.

Parameters
NameDescription
requestListServicesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListServicesResponse

The response received from the server.

ListServices(ListServicesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ListServicesResponse ListServices(ListServicesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

List all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the servicemanagement.services.bind permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project.

WARNING: If you need to query enabled services frequently or across an organization, you should use Cloud Asset Inventory API, which provides higher throughput and richer filtering capability.

Parameters
NameDescription
requestListServicesRequest

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
ListServicesResponse

The response received from the server.

ListServicesAsync(ListServicesRequest, CallOptions)

public virtual AsyncUnaryCall<ListServicesResponse> ListServicesAsync(ListServicesRequest request, CallOptions options)

List all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the servicemanagement.services.bind permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project.

WARNING: If you need to query enabled services frequently or across an organization, you should use Cloud Asset Inventory API, which provides higher throughput and richer filtering capability.

Parameters
NameDescription
requestListServicesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListServicesResponse>

The call object.

ListServicesAsync(ListServicesRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ListServicesResponse> ListServicesAsync(ListServicesRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

List all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the servicemanagement.services.bind permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project.

WARNING: If you need to query enabled services frequently or across an organization, you should use Cloud Asset Inventory API, which provides higher throughput and richer filtering capability.

Parameters
NameDescription
requestListServicesRequest

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<ListServicesResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override ServiceUsage.ServiceUsageClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
ServiceUsage.ServiceUsageClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.ServiceUsage.V1.ServiceUsage.ServiceUsageClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)