public sealed class ServiceUsageClientImpl : ServiceUsageClient
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(ServiceUsage.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 | ServiceUsage.ServiceUsageClient The underlying gRPC client. |
settings | ServiceUsageSettings The base ServiceUsageSettings used within this client. |
logger | ILogger Optional 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 |
ServiceUsage.ServiceUsageClient |
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 | BatchEnableServicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<BatchEnableServicesResponse, OperationMetadata> | The RPC response. |
BatchEnableServicesAsync(BatchEnableServicesRequest, CallSettings)
public override async 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 | BatchEnableServicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<BatchEnableServicesResponse, OperationMetadata>> | 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 | BatchGetServicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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 | BatchGetServicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<BatchGetServicesResponse> | 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 | DisableServiceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<DisableServiceResponse, OperationMetadata> | The RPC response. |
DisableServiceAsync(DisableServiceRequest, CallSettings)
public override async 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 | DisableServiceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<DisableServiceResponse, OperationMetadata>> | 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 | EnableServiceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<EnableServiceResponse, OperationMetadata> | The RPC response. |
EnableServiceAsync(EnableServiceRequest, CallSettings)
public override async 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 | EnableServiceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<EnableServiceResponse, OperationMetadata>> | 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 | GetServiceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If 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 | GetServiceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Service> | 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 | ListServicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListServicesResponse, Service> | 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 | ListServicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListServicesResponse, Service> | A pageable asynchronous sequence of Service resources. |