pub struct Workstations { /* private fields */ }Expand description
Implements a client for the Cloud Workstations API.
§Example
let client = Workstations::builder().build().await?;
// use `client` to make requests to the Cloud Workstations API.§Service Description
Service for interacting with Cloud Workstations.
§Configuration
To configure Workstations use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://workstations.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
Workstations holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap Workstations in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl Workstations
impl Workstations
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for Workstations.
let client = Workstations::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: Workstations + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: Workstations + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn get_workstation_cluster(&self) -> GetWorkstationCluster
pub fn get_workstation_cluster(&self) -> GetWorkstationCluster
Returns the requested workstation cluster.
Sourcepub fn list_workstation_clusters(&self) -> ListWorkstationClusters
pub fn list_workstation_clusters(&self) -> ListWorkstationClusters
Returns all workstation clusters in the specified location.
Sourcepub fn create_workstation_cluster(&self) -> CreateWorkstationCluster
pub fn create_workstation_cluster(&self) -> CreateWorkstationCluster
Creates a new workstation cluster.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn update_workstation_cluster(&self) -> UpdateWorkstationCluster
pub fn update_workstation_cluster(&self) -> UpdateWorkstationCluster
Updates an existing workstation cluster.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_workstation_cluster(&self) -> DeleteWorkstationCluster
pub fn delete_workstation_cluster(&self) -> DeleteWorkstationCluster
Deletes the specified workstation cluster.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn get_workstation_config(&self) -> GetWorkstationConfig
pub fn get_workstation_config(&self) -> GetWorkstationConfig
Returns the requested workstation configuration.
Sourcepub fn list_workstation_configs(&self) -> ListWorkstationConfigs
pub fn list_workstation_configs(&self) -> ListWorkstationConfigs
Returns all workstation configurations in the specified cluster.
Sourcepub fn list_usable_workstation_configs(&self) -> ListUsableWorkstationConfigs
pub fn list_usable_workstation_configs(&self) -> ListUsableWorkstationConfigs
Returns all workstation configurations in the specified cluster on which the caller has the “workstations.workstation.create” permission.
Sourcepub fn create_workstation_config(&self) -> CreateWorkstationConfig
pub fn create_workstation_config(&self) -> CreateWorkstationConfig
Creates a new workstation configuration.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn update_workstation_config(&self) -> UpdateWorkstationConfig
pub fn update_workstation_config(&self) -> UpdateWorkstationConfig
Updates an existing workstation configuration.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_workstation_config(&self) -> DeleteWorkstationConfig
pub fn delete_workstation_config(&self) -> DeleteWorkstationConfig
Deletes the specified workstation configuration.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn get_workstation(&self) -> GetWorkstation
pub fn get_workstation(&self) -> GetWorkstation
Returns the requested workstation.
Sourcepub fn list_workstations(&self) -> ListWorkstations
pub fn list_workstations(&self) -> ListWorkstations
Returns all Workstations using the specified workstation configuration.
Sourcepub fn list_usable_workstations(&self) -> ListUsableWorkstations
pub fn list_usable_workstations(&self) -> ListUsableWorkstations
Returns all workstations using the specified workstation configuration on which the caller has the “workstations.workstations.use” permission.
Sourcepub fn create_workstation(&self) -> CreateWorkstation
pub fn create_workstation(&self) -> CreateWorkstation
Creates a new workstation.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn update_workstation(&self) -> UpdateWorkstation
pub fn update_workstation(&self) -> UpdateWorkstation
Updates an existing workstation.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_workstation(&self) -> DeleteWorkstation
pub fn delete_workstation(&self) -> DeleteWorkstation
Deletes the specified workstation.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn start_workstation(&self) -> StartWorkstation
pub fn start_workstation(&self) -> StartWorkstation
Starts running a workstation so that users can connect to it.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn stop_workstation(&self) -> StopWorkstation
pub fn stop_workstation(&self) -> StopWorkstation
Stops running a workstation, reducing costs.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn generate_access_token(&self) -> GenerateAccessToken
pub fn generate_access_token(&self) -> GenerateAccessToken
Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.
Sourcepub fn set_iam_policy(&self) -> SetIamPolicy
pub fn set_iam_policy(&self) -> SetIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
errors.
Sourcepub fn get_iam_policy(&self) -> GetIamPolicy
pub fn get_iam_policy(&self) -> GetIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Sourcepub fn test_iam_permissions(&self) -> TestIamPermissions
pub fn test_iam_permissions(&self) -> TestIamPermissions
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Sourcepub fn delete_operation(&self) -> DeleteOperation
pub fn delete_operation(&self) -> DeleteOperation
Provides the Operations service functionality in this service.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for Workstations
impl Clone for Workstations
Source§fn clone(&self) -> Workstations
fn clone(&self) -> Workstations
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more