pub struct Config { /* private fields */ }Expand description
Implements a client for the Cloud Security Compliance API.
§Example
let client = Config::builder().build().await?;
// use `client` to make requests to the Cloud Security Compliance API.§Service Description
Config Service manages compliance frameworks, cloud controls, and their configurations.
§Configuration
To configure Config 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://cloudsecuritycompliance.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
Config holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap Config in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl Config
impl Config
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for Config.
let client = Config::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: Config + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: Config + '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 list_frameworks(&self) -> ListFrameworks
pub fn list_frameworks(&self) -> ListFrameworks
Lists the frameworks (both built-in and custom) that are available within the parent resource. The latest major version of each framework is returned. This method supports pagination.
Sourcepub fn get_framework(&self) -> GetFramework
pub fn get_framework(&self) -> GetFramework
Gets details about a framework. This method retrieves the latest major version of the framework.
To retrieve a specific major version, include major_revision_id in
the request.
Sourcepub fn create_framework(&self) -> CreateFramework
pub fn create_framework(&self) -> CreateFramework
Creates a custom framework in a given parent resource. You can’t create built-in frameworks because those are managed by Google.
Sourcepub fn update_framework(&self) -> UpdateFramework
pub fn update_framework(&self) -> UpdateFramework
Updates a custom framework.
This method allows for partial updates of a framework. Use the
update_mask to specify which fields to update. Consider the following:
- If you provide an
update_mask, only the fields that are specified in the mask are updated. - If you don’t provide an
update_mask, all the fields that are present in the request’sframeworkbody are used to overwrite the existing resource.
You can only update frameworks with the CUSTOM type.
A successful update creates a new version of the framework.
Sourcepub fn delete_framework(&self) -> DeleteFramework
pub fn delete_framework(&self) -> DeleteFramework
Deletes a custom framework, including all its major and minor revisions. Consider the following:
- You can’t delete built-in frameworks. You can only delete frameworks
with type
CUSTOM. - You can’t delete frameworks that are deployed to a resource.
- You can’t restore a deleted framework. This action is permanent.
Sourcepub fn list_cloud_controls(&self) -> ListCloudControls
pub fn list_cloud_controls(&self) -> ListCloudControls
Lists the cloud controls (both built-in and custom) that are available in a given parent resource. The latest major version of each cloud control is returned. This method supports pagination.
Sourcepub fn get_cloud_control(&self) -> GetCloudControl
pub fn get_cloud_control(&self) -> GetCloudControl
Gets details about a cloud control. This method retrieves the latest major version of a cloud control that you identify by name.
By default, the latest major version of the cloud control is returned.
To retrieve a specific major version, include major_revision_id in
the request.
Sourcepub fn create_cloud_control(&self) -> CreateCloudControl
pub fn create_cloud_control(&self) -> CreateCloudControl
Creates a custom cloud control in a given parent resource. You can’t create built-in cloud controls because those are managed by Google.
Sourcepub fn update_cloud_control(&self) -> UpdateCloudControl
pub fn update_cloud_control(&self) -> UpdateCloudControl
Updates a custom cloud control.
This method allows for partial updates of a cloud control. Use the
update_mask to specify which fields to update. Consider the following:
- If you provide an
update_mask, only the fields that are specified in the mask are updated. - If you don’t provide an
update_mask, all the fields that are present in the request’scloud_controlbody are used to overwrite the existing resource.
You can only update cloud controls with the CUSTOM type.
A successful update creates a new version of the cloud control.
Sourcepub fn delete_cloud_control(&self) -> DeleteCloudControl
pub fn delete_cloud_control(&self) -> DeleteCloudControl
Deletes a custom cloud control, including all its major and minor revisions. Consider the following:
- You can’t delete built-in cloud controls. You can only delete cloud
controls with type
CUSTOM. - You can’t delete cloud controls if any of the versions are referenced by a framework.
- You can’t restore a deleted cloud control. This action is permanent.
Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service.
Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
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.