pub struct SecurityCenter { /* private fields */ }Expand description
Implements a client for the Security Command Center API.
§Example
let client = SecurityCenter::builder().build().await?;
// use `client` to make requests to the Security Command Center API.§Service Description
V2 APIs for Security Center service.
§Configuration
To configure SecurityCenter 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://securitycenter.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
SecurityCenter holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap SecurityCenter in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl SecurityCenter
impl SecurityCenter
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for SecurityCenter.
let client = SecurityCenter::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: SecurityCenter + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: SecurityCenter + '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 batch_create_resource_value_configs(
&self,
) -> BatchCreateResourceValueConfigs
pub fn batch_create_resource_value_configs( &self, ) -> BatchCreateResourceValueConfigs
Creates a ResourceValueConfig for an organization. Maps user’s tags to difference resource values for use by the attack path simulation.
Sourcepub fn bulk_mute_findings(&self) -> BulkMuteFindings
pub fn bulk_mute_findings(&self) -> BulkMuteFindings
Kicks off an LRO to bulk mute findings for a parent based on a filter. If no location is specified, findings are muted in global. The parent can be either an organization, folder, or project. The findings matched by the filter will be muted after the LRO is done.
§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 create_big_query_export(&self) -> CreateBigQueryExport
pub fn create_big_query_export(&self) -> CreateBigQueryExport
Creates a BigQuery export.
Sourcepub fn create_finding(&self) -> CreateFinding
pub fn create_finding(&self) -> CreateFinding
Creates a finding in a location. The corresponding source must exist for finding creation to succeed.
Sourcepub fn create_mute_config(&self) -> CreateMuteConfig
pub fn create_mute_config(&self) -> CreateMuteConfig
Creates a mute config.
Sourcepub fn create_notification_config(&self) -> CreateNotificationConfig
pub fn create_notification_config(&self) -> CreateNotificationConfig
Creates a notification config.
Sourcepub fn create_source(&self) -> CreateSource
pub fn create_source(&self) -> CreateSource
Creates a source.
Sourcepub fn delete_big_query_export(&self) -> DeleteBigQueryExport
pub fn delete_big_query_export(&self) -> DeleteBigQueryExport
Deletes an existing BigQuery export.
Sourcepub fn delete_mute_config(&self) -> DeleteMuteConfig
pub fn delete_mute_config(&self) -> DeleteMuteConfig
Deletes an existing mute config. If no location is specified, default is global.
Sourcepub fn delete_notification_config(&self) -> DeleteNotificationConfig
pub fn delete_notification_config(&self) -> DeleteNotificationConfig
Deletes a notification config.
Sourcepub fn delete_resource_value_config(&self) -> DeleteResourceValueConfig
pub fn delete_resource_value_config(&self) -> DeleteResourceValueConfig
Deletes a ResourceValueConfig.
Sourcepub fn get_big_query_export(&self) -> GetBigQueryExport
pub fn get_big_query_export(&self) -> GetBigQueryExport
Gets a BigQuery export.
Sourcepub fn get_simulation(&self) -> GetSimulation
pub fn get_simulation(&self) -> GetSimulation
Get the simulation by name or the latest simulation for the given organization.
Sourcepub fn get_valued_resource(&self) -> GetValuedResource
pub fn get_valued_resource(&self) -> GetValuedResource
Get the valued resource by name
Sourcepub fn get_iam_policy(&self) -> GetIamPolicy
pub fn get_iam_policy(&self) -> GetIamPolicy
Gets the access control policy on the specified Source.
Sourcepub fn get_mute_config(&self) -> GetMuteConfig
pub fn get_mute_config(&self) -> GetMuteConfig
Gets a mute config. If no location is specified, default is global.
Sourcepub fn get_notification_config(&self) -> GetNotificationConfig
pub fn get_notification_config(&self) -> GetNotificationConfig
Gets a notification config.
Sourcepub fn get_resource_value_config(&self) -> GetResourceValueConfig
pub fn get_resource_value_config(&self) -> GetResourceValueConfig
Gets a ResourceValueConfig.
Sourcepub fn get_source(&self) -> GetSource
pub fn get_source(&self) -> GetSource
Gets a source.
Sourcepub fn group_findings(&self) -> GroupFindings
pub fn group_findings(&self) -> GroupFindings
Filters an organization or source’s findings and groups them by their specified properties in a location. If no location is specified, findings are assumed to be in global
To group across all sources provide a - as the source id.
The following list shows some examples:
/v2/organizations/{organization_id}/sources/-/findings
/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings
/v2/folders/{folder_id}/sources/-/findings/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings/v2/projects/{project_id}/sources/-/findings/v2/projects/{project_id}/sources/-/locations/{location_id}/findings
Sourcepub fn list_attack_paths(&self) -> ListAttackPaths
pub fn list_attack_paths(&self) -> ListAttackPaths
Lists the attack paths for a set of simulation results or valued resources and filter.
Sourcepub fn list_big_query_exports(&self) -> ListBigQueryExports
pub fn list_big_query_exports(&self) -> ListBigQueryExports
Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.
Sourcepub fn list_findings(&self) -> ListFindings
pub fn list_findings(&self) -> ListFindings
Lists an organization or source’s findings.
To list across all sources for a given location provide a - as the source
id. If no location is specified, finding are assumed to be in global.
The following list shows some examples:
/v2/organizations/{organization_id}/sources/-/findings
/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings
Sourcepub fn list_mute_configs(&self) -> ListMuteConfigs
pub fn list_mute_configs(&self) -> ListMuteConfigs
Lists mute configs. If no location is specified, default is global.
Sourcepub fn list_notification_configs(&self) -> ListNotificationConfigs
pub fn list_notification_configs(&self) -> ListNotificationConfigs
Lists notification configs.
Sourcepub fn list_resource_value_configs(&self) -> ListResourceValueConfigs
pub fn list_resource_value_configs(&self) -> ListResourceValueConfigs
Lists all ResourceValueConfigs.
Sourcepub fn list_sources(&self) -> ListSources
pub fn list_sources(&self) -> ListSources
Lists all sources belonging to an organization.
Sourcepub fn list_valued_resources(&self) -> ListValuedResources
pub fn list_valued_resources(&self) -> ListValuedResources
Lists the valued resources for a set of simulation results and filter.
Sourcepub fn set_finding_state(&self) -> SetFindingState
pub fn set_finding_state(&self) -> SetFindingState
Updates the state of a finding. If no location is specified, finding is assumed to be in global
Sourcepub fn set_iam_policy(&self) -> SetIamPolicy
pub fn set_iam_policy(&self) -> SetIamPolicy
Sets the access control policy on the specified Source.
Sourcepub fn set_mute(&self) -> SetMute
pub fn set_mute(&self) -> SetMute
Updates the mute state of a finding. If no location is specified, finding is assumed to be in global
Sourcepub fn test_iam_permissions(&self) -> TestIamPermissions
pub fn test_iam_permissions(&self) -> TestIamPermissions
Returns the permissions that a caller has on the specified source.
Sourcepub fn update_big_query_export(&self) -> UpdateBigQueryExport
pub fn update_big_query_export(&self) -> UpdateBigQueryExport
Updates a BigQuery export.
Sourcepub fn update_external_system(&self) -> UpdateExternalSystem
pub fn update_external_system(&self) -> UpdateExternalSystem
Updates external system. This is for a given finding. If no location is specified, finding is assumed to be in global
Sourcepub fn update_finding(&self) -> UpdateFinding
pub fn update_finding(&self) -> UpdateFinding
Creates or updates a finding. If no location is specified, finding is assumed to be in global. The corresponding source must exist for a finding creation to succeed.
Sourcepub fn update_mute_config(&self) -> UpdateMuteConfig
pub fn update_mute_config(&self) -> UpdateMuteConfig
Updates a mute config. If no location is specified, default is global.
Sourcepub fn update_notification_config(&self) -> UpdateNotificationConfig
pub fn update_notification_config(&self) -> UpdateNotificationConfig
Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter
Sourcepub fn update_resource_value_config(&self) -> UpdateResourceValueConfig
pub fn update_resource_value_config(&self) -> UpdateResourceValueConfig
Updates an existing ResourceValueConfigs with new rules.
Sourcepub fn update_security_marks(&self) -> UpdateSecurityMarks
pub fn update_security_marks(&self) -> UpdateSecurityMarks
Updates security marks. For Finding Security marks, if no location is specified, finding is assumed to be in global. Assets Security Marks can only be accessed through global endpoint.
Sourcepub fn update_source(&self) -> UpdateSource
pub fn update_source(&self) -> UpdateSource
Updates a source.
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 SecurityCenter
impl Clone for SecurityCenter
Source§fn clone(&self) -> SecurityCenter
fn clone(&self) -> SecurityCenter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more