public sealed class ServiceUsageClientImpl : ServiceUsageClientReference documentation and code samples for the Service Usage v1 API class ServiceUsageClientImpl.
ServiceUsage client wrapper implementation, for convenient use.
Namespace
Google.Cloud.ServiceUsage.V1Assembly
Google.Cloud.ServiceUsage.V1.dll
Remarks
Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.
Constructors
ServiceUsageClientImpl(ServiceUsageClient, ServiceUsageSettings, ILogger)
public ServiceUsageClientImpl(ServiceUsage.ServiceUsageClient grpcClient, ServiceUsageSettings settings, ILogger logger)Constructs a client wrapper for the ServiceUsage service, with the specified gRPC client and settings.
| Parameters | |
|---|---|
| Name | Description |
grpcClient |
ServiceUsageServiceUsageClientThe underlying gRPC client. |
settings |
ServiceUsageSettingsThe base ServiceUsageSettings used within this client. |
logger |
ILoggerOptional ILogger to use within this client. |
Properties
BatchEnableServicesOperationsClient
public override OperationsClient BatchEnableServicesOperationsClient { get; }The long-running operations client for BatchEnableServices.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
DisableServiceOperationsClient
public override OperationsClient DisableServiceOperationsClient { get; }The long-running operations client for DisableService.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
EnableServiceOperationsClient
public override OperationsClient EnableServiceOperationsClient { get; }The long-running operations client for EnableService.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public override ServiceUsage.ServiceUsageClient GrpcClient { get; }The underlying gRPC ServiceUsage client
| Property Value | |
|---|---|
| Type | Description |
ServiceUsageServiceUsageClient |
|
Methods
BatchEnableServices(BatchEnableServicesRequest, CallSettings)
public override Operation<BatchEnableServicesResponse, OperationMetadata> BatchEnableServices(BatchEnableServicesRequest request, CallSettings callSettings = null)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 | |
|---|---|
| Name | Description |
request |
BatchEnableServicesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationBatchEnableServicesResponseOperationMetadata |
The RPC response. |
BatchEnableServicesAsync(BatchEnableServicesRequest, CallSettings)
public override Task<Operation<BatchEnableServicesResponse, OperationMetadata>> BatchEnableServicesAsync(BatchEnableServicesRequest request, CallSettings callSettings = null)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 | |
|---|---|
| Name | Description |
request |
BatchEnableServicesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationBatchEnableServicesResponseOperationMetadata |
A Task containing the RPC response. |
BatchGetServices(BatchGetServicesRequest, CallSettings)
public override BatchGetServicesResponse BatchGetServices(BatchGetServicesRequest request, CallSettings callSettings = null)Returns the service configurations and enabled states for a given list of services.
| Parameters | |
|---|---|
| Name | Description |
request |
BatchGetServicesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
BatchGetServicesResponse |
The RPC response. |
BatchGetServicesAsync(BatchGetServicesRequest, CallSettings)
public override Task<BatchGetServicesResponse> BatchGetServicesAsync(BatchGetServicesRequest request, CallSettings callSettings = null)Returns the service configurations and enabled states for a given list of services.
| Parameters | |
|---|---|
| Name | Description |
request |
BatchGetServicesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskBatchGetServicesResponse |
A Task containing the RPC response. |
DisableService(DisableServiceRequest, CallSettings)
public override Operation<DisableServiceResponse, OperationMetadata> DisableService(DisableServiceRequest request, CallSettings callSettings = null)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 | |
|---|---|
| Name | Description |
request |
DisableServiceRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationDisableServiceResponseOperationMetadata |
The RPC response. |
DisableServiceAsync(DisableServiceRequest, CallSettings)
public override Task<Operation<DisableServiceResponse, OperationMetadata>> DisableServiceAsync(DisableServiceRequest request, CallSettings callSettings = null)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 | |
|---|---|
| Name | Description |
request |
DisableServiceRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationDisableServiceResponseOperationMetadata |
A Task containing the RPC response. |
EnableService(EnableServiceRequest, CallSettings)
public override Operation<EnableServiceResponse, OperationMetadata> EnableService(EnableServiceRequest request, CallSettings callSettings = null)Enable a service so that it can be used with a project.
| Parameters | |
|---|---|
| Name | Description |
request |
EnableServiceRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEnableServiceResponseOperationMetadata |
The RPC response. |
EnableServiceAsync(EnableServiceRequest, CallSettings)
public override Task<Operation<EnableServiceResponse, OperationMetadata>> EnableServiceAsync(EnableServiceRequest request, CallSettings callSettings = null)Enable a service so that it can be used with a project.
| Parameters | |
|---|---|
| Name | Description |
request |
EnableServiceRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEnableServiceResponseOperationMetadata |
A Task containing the RPC response. |
GetService(GetServiceRequest, CallSettings)
public override Service GetService(GetServiceRequest request, CallSettings callSettings = null)Returns the service configuration and enabled state for a given service.
| Parameters | |
|---|---|
| Name | Description |
request |
GetServiceRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Service |
The RPC response. |
GetServiceAsync(GetServiceRequest, CallSettings)
public override Task<Service> GetServiceAsync(GetServiceRequest request, CallSettings callSettings = null)Returns the service configuration and enabled state for a given service.
| Parameters | |
|---|---|
| Name | Description |
request |
GetServiceRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskService |
A Task containing the RPC response. |
ListServices(ListServicesRequest, CallSettings)
public override PagedEnumerable<ListServicesResponse, Service> ListServices(ListServicesRequest request, CallSettings callSettings = null)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 | |
|---|---|
| Name | Description |
request |
ListServicesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListServicesResponseService |
A pageable sequence of Service resources. |
ListServicesAsync(ListServicesRequest, CallSettings)
public override PagedAsyncEnumerable<ListServicesResponse, Service> ListServicesAsync(ListServicesRequest request, CallSettings callSettings = null)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 | |
|---|---|
| Name | Description |
request |
ListServicesRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListServicesResponseService |
A pageable asynchronous sequence of Service resources. |