Struct gapi_grpc::google::api::serviceusage::v1::service_usage_client::ServiceUsageClient [−][src]
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.
Implementations
impl ServiceUsageClient<Channel>
[src][−]
pub async fn connect<D>(dst: D) -> Result<Self, Error> where
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
[src][−]
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
Attempt to create a new client by connecting to a given endpoint.
impl<T> ServiceUsageClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
[src][−]
T: GrpcService<BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
[src]
pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self
[src]
pub async fn enable_service(
&mut self,
request: impl IntoRequest<EnableServiceRequest>
) -> Result<Response<Operation>, Status>
[src][−]
&mut self,
request: impl IntoRequest<EnableServiceRequest>
) -> Result<Response<Operation>, Status>
Enable a service so that it can be used with a project.
pub async fn disable_service(
&mut self,
request: impl IntoRequest<DisableServiceRequest>
) -> Result<Response<Operation>, Status>
[src][−]
&mut self,
request: impl IntoRequest<DisableServiceRequest>
) -> Result<Response<Operation>, Status>
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.
pub async fn get_service(
&mut self,
request: impl IntoRequest<GetServiceRequest>
) -> Result<Response<Service>, Status>
[src][−]
&mut self,
request: impl IntoRequest<GetServiceRequest>
) -> Result<Response<Service>, Status>
Returns the service configuration and enabled state for a given service.
pub async fn list_services(
&mut self,
request: impl IntoRequest<ListServicesRequest>
) -> Result<Response<ListServicesResponse>, Status>
[src][−]
&mut self,
request: impl IntoRequest<ListServicesRequest>
) -> Result<Response<ListServicesResponse>, Status>
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.
pub async fn batch_enable_services(
&mut self,
request: impl IntoRequest<BatchEnableServicesRequest>
) -> Result<Response<Operation>, Status>
[src][−]
&mut self,
request: impl IntoRequest<BatchEnableServicesRequest>
) -> Result<Response<Operation>, Status>
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.
pub async fn batch_get_services(
&mut self,
request: impl IntoRequest<BatchGetServicesRequest>
) -> Result<Response<BatchGetServicesResponse>, Status>
[src][−]
&mut self,
request: impl IntoRequest<BatchGetServicesRequest>
) -> Result<Response<BatchGetServicesResponse>, Status>
Returns the service configurations and enabled states for a given list of services.
Trait Implementations
impl<T: Clone> Clone for ServiceUsageClient<T>
[src][+]
impl<T> Debug for ServiceUsageClient<T>
[src][+]
Auto Trait Implementations
impl<T> !RefUnwindSafe for ServiceUsageClient<T>
impl<T> Send for ServiceUsageClient<T> where
T: Send,
T: Send,
impl<T> Sync for ServiceUsageClient<T> where
T: Sync,
T: Sync,
impl<T> Unpin for ServiceUsageClient<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for ServiceUsageClient<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T> Instrument for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> IntoRequest<T> for T
[src][+]
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src][+]
V: MultiLane<T>,