SecurityCenter

Struct SecurityCenter 

Source
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

Source

pub fn builder() -> ClientBuilder

Returns a builder for SecurityCenter.

let client = SecurityCenter::builder().build().await?;
Source

pub fn from_stub<T>(stub: T) -> Self
where 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.

Source

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.

Source

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.

Source

pub fn create_big_query_export(&self) -> CreateBigQueryExport

Creates a BigQuery export.

Source

pub fn create_finding(&self) -> CreateFinding

Creates a finding in a location. The corresponding source must exist for finding creation to succeed.

Source

pub fn create_mute_config(&self) -> CreateMuteConfig

Creates a mute config.

Source

pub fn create_notification_config(&self) -> CreateNotificationConfig

Creates a notification config.

Source

pub fn create_source(&self) -> CreateSource

Creates a source.

Source

pub fn delete_big_query_export(&self) -> DeleteBigQueryExport

Deletes an existing BigQuery export.

Source

pub fn delete_mute_config(&self) -> DeleteMuteConfig

Deletes an existing mute config. If no location is specified, default is global.

Source

pub fn delete_notification_config(&self) -> DeleteNotificationConfig

Deletes a notification config.

Source

pub fn delete_resource_value_config(&self) -> DeleteResourceValueConfig

Deletes a ResourceValueConfig.

Source

pub fn get_big_query_export(&self) -> GetBigQueryExport

Gets a BigQuery export.

Source

pub fn get_simulation(&self) -> GetSimulation

Get the simulation by name or the latest simulation for the given organization.

Source

pub fn get_valued_resource(&self) -> GetValuedResource

Get the valued resource by name

Source

pub fn get_iam_policy(&self) -> GetIamPolicy

Gets the access control policy on the specified Source.

Source

pub fn get_mute_config(&self) -> GetMuteConfig

Gets a mute config. If no location is specified, default is global.

Source

pub fn get_notification_config(&self) -> GetNotificationConfig

Gets a notification config.

Source

pub fn get_resource_value_config(&self) -> GetResourceValueConfig

Gets a ResourceValueConfig.

Source

pub fn get_source(&self) -> GetSource

Gets a source.

Source

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
Source

pub fn list_attack_paths(&self) -> ListAttackPaths

Lists the attack paths for a set of simulation results or valued resources and filter.

Source

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.

Source

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

Source

pub fn list_mute_configs(&self) -> ListMuteConfigs

Lists mute configs. If no location is specified, default is global.

Source

pub fn list_notification_configs(&self) -> ListNotificationConfigs

Lists notification configs.

Source

pub fn list_resource_value_configs(&self) -> ListResourceValueConfigs

Lists all ResourceValueConfigs.

Source

pub fn list_sources(&self) -> ListSources

Lists all sources belonging to an organization.

Source

pub fn list_valued_resources(&self) -> ListValuedResources

Lists the valued resources for a set of simulation results and filter.

Source

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

Source

pub fn set_iam_policy(&self) -> SetIamPolicy

Sets the access control policy on the specified Source.

Source

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

Source

pub fn test_iam_permissions(&self) -> TestIamPermissions

Returns the permissions that a caller has on the specified source.

Source

pub fn update_big_query_export(&self) -> UpdateBigQueryExport

Updates a BigQuery export.

Source

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

Source

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.

Source

pub fn update_mute_config(&self) -> UpdateMuteConfig

Updates a mute config. If no location is specified, default is global.

Source

pub fn update_notification_config(&self) -> UpdateNotificationConfig

Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

Source

pub fn update_resource_value_config(&self) -> UpdateResourceValueConfig

Updates an existing ResourceValueConfigs with new rules.

Source

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.

Source

pub fn update_source(&self) -> UpdateSource

Updates a source.

Source

pub fn list_operations(&self) -> ListOperations

Provides the Operations service functionality in this service.

Source

pub fn get_operation(&self) -> GetOperation

Provides the Operations service functionality in this service.

Source

pub fn delete_operation(&self) -> DeleteOperation

Provides the Operations service functionality in this service.

Source

pub fn cancel_operation(&self) -> CancelOperation

Provides the Operations service functionality in this service.

Trait Implementations§

Source§

impl Clone for SecurityCenter

Source§

fn clone(&self) -> SecurityCenter

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SecurityCenter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more