Struct google_api_proto::google::cloud::shell::v1::cloud_shell_service_client::CloudShellServiceClient
source · pub struct CloudShellServiceClient<T> { /* private fields */ }
Expand description
API for interacting with Google Cloud Shell. Each user of Cloud Shell has at least one environment, which has the ID “default”. Environment consists of a Docker image defining what is installed on the environment and a home directory containing the user’s data that will remain across sessions. Clients use this API to start and fetch information about their environment, which can then be used to connect to that environment via a separate SSH client.
Implementations§
source§impl<T> CloudShellServiceClient<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> CloudShellServiceClient<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,
) -> CloudShellServiceClient<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 get_environment(
&mut self,
request: impl IntoRequest<GetEnvironmentRequest>,
) -> Result<Response<Environment>, Status>
pub async fn get_environment( &mut self, request: impl IntoRequest<GetEnvironmentRequest>, ) -> Result<Response<Environment>, Status>
Gets an environment. Returns NOT_FOUND if the environment does not exist.
sourcepub async fn start_environment(
&mut self,
request: impl IntoRequest<StartEnvironmentRequest>,
) -> Result<Response<Operation>, Status>
pub async fn start_environment( &mut self, request: impl IntoRequest<StartEnvironmentRequest>, ) -> Result<Response<Operation>, Status>
Starts an existing environment, allowing clients to connect to it. The returned operation will contain an instance of StartEnvironmentMetadata in its metadata field. Users can wait for the environment to start by polling this operation via GetOperation. Once the environment has finished starting and is ready to accept connections, the operation will contain a StartEnvironmentResponse in its response field.
Sends OAuth credentials to a running environment on behalf of a user. When this completes, the environment will be authorized to run various Google Cloud command line tools without requiring the user to manually authenticate.
sourcepub async fn add_public_key(
&mut self,
request: impl IntoRequest<AddPublicKeyRequest>,
) -> Result<Response<Operation>, Status>
pub async fn add_public_key( &mut self, request: impl IntoRequest<AddPublicKeyRequest>, ) -> Result<Response<Operation>, Status>
Adds a public SSH key to an environment, allowing clients with the corresponding private key to connect to that environment via SSH. If a key with the same content already exists, this will error with ALREADY_EXISTS.
sourcepub async fn remove_public_key(
&mut self,
request: impl IntoRequest<RemovePublicKeyRequest>,
) -> Result<Response<Operation>, Status>
pub async fn remove_public_key( &mut self, request: impl IntoRequest<RemovePublicKeyRequest>, ) -> Result<Response<Operation>, Status>
Removes a public SSH key from an environment. Clients will no longer be able to connect to the environment using the corresponding private key. If a key with the same content is not present, this will error with NOT_FOUND.
Trait Implementations§
source§impl<T: Clone> Clone for CloudShellServiceClient<T>
impl<T: Clone> Clone for CloudShellServiceClient<T>
source§fn clone(&self) -> CloudShellServiceClient<T>
fn clone(&self) -> CloudShellServiceClient<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 CloudShellServiceClient<T>
impl<T> RefUnwindSafe for CloudShellServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for CloudShellServiceClient<T>where
T: Send,
impl<T> Sync for CloudShellServiceClient<T>where
T: Sync,
impl<T> Unpin for CloudShellServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for CloudShellServiceClient<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