Struct google_api_proto::google::api::apikeys::v2::api_keys_client::ApiKeysClient
source · pub struct ApiKeysClient<T> { /* private fields */ }
Expand description
Manages the API keys associated with projects.
Implementations§
source§impl<T> ApiKeysClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> ApiKeysClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ApiKeysClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn create_key(
&mut self,
request: impl IntoRequest<CreateKeyRequest>,
) -> Result<Response<Operation>, Status>
pub async fn create_key( &mut self, request: impl IntoRequest<CreateKeyRequest>, ) -> Result<Response<Operation>, Status>
Creates a new API key.
NOTE: Key is a global resource; hence the only supported value for
location is global
.
sourcepub async fn list_keys(
&mut self,
request: impl IntoRequest<ListKeysRequest>,
) -> Result<Response<ListKeysResponse>, Status>
pub async fn list_keys( &mut self, request: impl IntoRequest<ListKeysRequest>, ) -> Result<Response<ListKeysResponse>, Status>
Lists the API keys owned by a project. The key string of the API key isn’t included in the response.
NOTE: Key is a global resource; hence the only supported value for
location is global
.
sourcepub async fn get_key(
&mut self,
request: impl IntoRequest<GetKeyRequest>,
) -> Result<Response<Key>, Status>
pub async fn get_key( &mut self, request: impl IntoRequest<GetKeyRequest>, ) -> Result<Response<Key>, Status>
Gets the metadata for an API key. The key string of the API key isn’t included in the response.
NOTE: Key is a global resource; hence the only supported value for
location is global
.
sourcepub async fn get_key_string(
&mut self,
request: impl IntoRequest<GetKeyStringRequest>,
) -> Result<Response<GetKeyStringResponse>, Status>
pub async fn get_key_string( &mut self, request: impl IntoRequest<GetKeyStringRequest>, ) -> Result<Response<GetKeyStringResponse>, Status>
Get the key string for an API key.
NOTE: Key is a global resource; hence the only supported value for
location is global
.
sourcepub async fn update_key(
&mut self,
request: impl IntoRequest<UpdateKeyRequest>,
) -> Result<Response<Operation>, Status>
pub async fn update_key( &mut self, request: impl IntoRequest<UpdateKeyRequest>, ) -> Result<Response<Operation>, Status>
Patches the modifiable fields of an API key. The key string of the API key isn’t included in the response.
NOTE: Key is a global resource; hence the only supported value for
location is global
.
sourcepub async fn delete_key(
&mut self,
request: impl IntoRequest<DeleteKeyRequest>,
) -> Result<Response<Operation>, Status>
pub async fn delete_key( &mut self, request: impl IntoRequest<DeleteKeyRequest>, ) -> Result<Response<Operation>, Status>
Deletes an API key. Deleted key can be retrieved within 30 days of deletion. Afterward, key will be purged from the project.
NOTE: Key is a global resource; hence the only supported value for
location is global
.
sourcepub async fn undelete_key(
&mut self,
request: impl IntoRequest<UndeleteKeyRequest>,
) -> Result<Response<Operation>, Status>
pub async fn undelete_key( &mut self, request: impl IntoRequest<UndeleteKeyRequest>, ) -> Result<Response<Operation>, Status>
Undeletes an API key which was deleted within 30 days.
NOTE: Key is a global resource; hence the only supported value for
location is global
.
sourcepub async fn lookup_key(
&mut self,
request: impl IntoRequest<LookupKeyRequest>,
) -> Result<Response<LookupKeyResponse>, Status>
pub async fn lookup_key( &mut self, request: impl IntoRequest<LookupKeyRequest>, ) -> Result<Response<LookupKeyResponse>, Status>
Find the parent project and resource name of the API
key that matches the key string in the request. If the API key has been
purged, resource name will not be set.
The service account must have the apikeys.keys.lookup
permission
on the parent project.
Trait Implementations§
source§impl<T: Clone> Clone for ApiKeysClient<T>
impl<T: Clone> Clone for ApiKeysClient<T>
source§fn clone(&self) -> ApiKeysClient<T>
fn clone(&self) -> ApiKeysClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for ApiKeysClient<T>
impl<T> RefUnwindSafe for ApiKeysClient<T>where
T: RefUnwindSafe,
impl<T> Send for ApiKeysClient<T>where
T: Send,
impl<T> Sync for ApiKeysClient<T>where
T: Sync,
impl<T> Unpin for ApiKeysClient<T>where
T: Unpin,
impl<T> UnwindSafe for ApiKeysClient<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request