pub struct AssuredWorkloadsService { /* private fields */ }Expand description
Implements a client for the Assured Workloads API.
§Example
let client = AssuredWorkloadsService::builder().build().await?;
// use `client` to make requests to the Assured Workloads API.§Service Description
Service to manage AssuredWorkloads.
§Configuration
To configure AssuredWorkloadsService 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://assuredworkloads.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
AssuredWorkloadsService holds a connection pool internally, it is advised to
create one and the reuse it.  You do not need to wrap AssuredWorkloadsService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl AssuredWorkloadsService
 
impl AssuredWorkloadsService
Sourcepub fn builder() -> ClientBuilder
 
pub fn builder() -> ClientBuilder
Returns a builder for AssuredWorkloadsService.
let client = AssuredWorkloadsService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
    T: AssuredWorkloadsService + 'static,
 
pub fn from_stub<T>(stub: T) -> Selfwhere
    T: AssuredWorkloadsService + '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 create_workload(&self) -> CreateWorkload
 
pub fn create_workload(&self) -> CreateWorkload
Creates Assured Workload.
§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_workload(&self) -> UpdateWorkload
 
pub fn update_workload(&self) -> UpdateWorkload
Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don’t set etag field in the Workload. Only one update operation per workload can be in progress.
Sourcepub fn restrict_allowed_resources(&self) -> RestrictAllowedResources
 
pub fn restrict_allowed_resources(&self) -> RestrictAllowedResources
Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality.
Sourcepub fn delete_workload(&self) -> DeleteWorkload
 
pub fn delete_workload(&self) -> DeleteWorkload
Deletes the workload. Make sure that workload’s direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error.
Sourcepub fn get_workload(&self) -> GetWorkload
 
pub fn get_workload(&self) -> GetWorkload
Gets Assured Workload associated with a CRM Node
Sourcepub fn list_workloads(&self) -> ListWorkloads
 
pub fn list_workloads(&self) -> ListWorkloads
Lists Assured Workloads under a CRM Node.
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.
Trait Implementations§
Source§impl Clone for AssuredWorkloadsService
 
impl Clone for AssuredWorkloadsService
Source§fn clone(&self) -> AssuredWorkloadsService
 
fn clone(&self) -> AssuredWorkloadsService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more