pub struct FindingsRefinementService { /* private fields */ }Expand description
Implements a client for the Chronicle API.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
async fn sample(
project_id: &str,
location_id: &str,
instance_id: &str,
) -> anyhow::Result<()> {
let client = FindingsRefinementService::builder().build().await?;
let mut list = client.list_findings_refinements()
.set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"))
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}§Service Description
FindingsRefinementService provides an interface for filtering out findings that are unlikely to be real threats to prevent them from triggering alerts or notifications.
§Configuration
To configure FindingsRefinementService 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://chronicle.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured with Private Google Access with VPC Service Controls) may want to 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
FindingsRefinementService holds a connection pool internally, it is advised to
create one and reuse it. You do not need to wrap FindingsRefinementService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl FindingsRefinementService
impl FindingsRefinementService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for FindingsRefinementService.
let client = FindingsRefinementService::builder().build().await?;Sourcepub fn from_stub<T>(stub: impl Into<Arc<T>>) -> Selfwhere
T: FindingsRefinementService + 'static,
pub fn from_stub<T>(stub: impl Into<Arc<T>>) -> Selfwhere
T: FindingsRefinementService + '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_findings_refinement(&self) -> GetFindingsRefinement
pub fn get_findings_refinement(&self) -> GetFindingsRefinement
Gets a single findings refinement.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService, project_id: &str, location_id: &str, instance_id: &str, findings_refinement_id: &str
) -> Result<()> {
let response = client.get_findings_refinement()
.set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/findingsRefinements/{findings_refinement_id}"))
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_findings_refinements(&self) -> ListFindingsRefinements
pub fn list_findings_refinements(&self) -> ListFindingsRefinements
Lists a collection of findings refinements.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService, project_id: &str, location_id: &str, instance_id: &str
) -> Result<()> {
let mut list = client.list_findings_refinements()
.set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"))
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn create_findings_refinement(&self) -> CreateFindingsRefinement
pub fn create_findings_refinement(&self) -> CreateFindingsRefinement
Creates a new findings refinement.
§Example
use google_cloud_chronicle_v1::model::FindingsRefinement;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService, project_id: &str, location_id: &str, instance_id: &str
) -> Result<()> {
let response = client.create_findings_refinement()
.set_parent(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}"))
.set_findings_refinement(
FindingsRefinement::new()/* set fields */
)
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn update_findings_refinement(&self) -> UpdateFindingsRefinement
pub fn update_findings_refinement(&self) -> UpdateFindingsRefinement
Updates a findings refinement.
§Example
use google_cloud_wkt::FieldMask;
use google_cloud_chronicle_v1::model::FindingsRefinement;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService, project_id: &str, location_id: &str, instance_id: &str, findings_refinement_id: &str
) -> Result<()> {
let response = client.update_findings_refinement()
.set_findings_refinement(
FindingsRefinement::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/findingsRefinements/{findings_refinement_id}"))/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn get_findings_refinement_deployment(
&self,
) -> GetFindingsRefinementDeployment
pub fn get_findings_refinement_deployment( &self, ) -> GetFindingsRefinementDeployment
Gets a findings refinement deployment.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService, project_id: &str, location_id: &str, instance_id: &str, findings_refinement_id: &str
) -> Result<()> {
let response = client.get_findings_refinement_deployment()
.set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/findingsRefinements/{findings_refinement_id}/deployment"))
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn update_findings_refinement_deployment(
&self,
) -> UpdateFindingsRefinementDeployment
pub fn update_findings_refinement_deployment( &self, ) -> UpdateFindingsRefinementDeployment
Updates a findings refinement deployment.
§Example
use google_cloud_wkt::FieldMask;
use google_cloud_chronicle_v1::model::FindingsRefinementDeployment;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService, project_id: &str, location_id: &str, instance_id: &str, findings_refinement_id: &str
) -> Result<()> {
let response = client.update_findings_refinement_deployment()
.set_findings_refinement_deployment(
FindingsRefinementDeployment::new().set_name(format!("projects/{project_id}/locations/{location_id}/instances/{instance_id}/findingsRefinements/{findings_refinement_id}/deployment"))/* set fields */
)
.set_update_mask(FieldMask::default().set_paths(["updated.field.path1", "updated.field.path2"]))
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_all_findings_refinement_deployments(
&self,
) -> ListAllFindingsRefinementDeployments
pub fn list_all_findings_refinement_deployments( &self, ) -> ListAllFindingsRefinementDeployments
Lists all findings refinement deployments.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService
) -> Result<()> {
let mut list = client.list_all_findings_refinement_deployments()
/* set fields */
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn compute_findings_refinement_activity(
&self,
) -> ComputeFindingsRefinementActivity
pub fn compute_findings_refinement_activity( &self, ) -> ComputeFindingsRefinementActivity
Returns findings refinement activity for a specific findings refinement.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService
) -> Result<()> {
let response = client.compute_findings_refinement_activity()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn compute_all_findings_refinement_activities(
&self,
) -> ComputeAllFindingsRefinementActivities
pub fn compute_all_findings_refinement_activities( &self, ) -> ComputeAllFindingsRefinementActivities
Returns findings refinement activity for all findings refinements.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService
) -> Result<()> {
let response = client.compute_all_findings_refinement_activities()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
§Example
use google_cloud_gax::paginator::ItemPaginator as _;
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService
) -> Result<()> {
let mut list = client.list_operations()
/* set fields */
.by_item();
while let Some(item) = list.next().await.transpose()? {
println!("{:?}", item);
}
Ok(())
}Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService
) -> Result<()> {
let response = client.get_operation()
/* set fields */
.send().await?;
println!("response {:?}", response);
Ok(())
}Sourcepub fn delete_operation(&self) -> DeleteOperation
pub fn delete_operation(&self) -> DeleteOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService
) -> Result<()> {
client.delete_operation()
/* set fields */
.send().await?;
Ok(())
}Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
§Example
use google_cloud_chronicle_v1::Result;
async fn sample(
client: &FindingsRefinementService
) -> Result<()> {
client.cancel_operation()
/* set fields */
.send().await?;
Ok(())
}Trait Implementations§
Source§impl Clone for FindingsRefinementService
impl Clone for FindingsRefinementService
Source§fn clone(&self) -> FindingsRefinementService
fn clone(&self) -> FindingsRefinementService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for FindingsRefinementService
impl !UnwindSafe for FindingsRefinementService
impl Freeze for FindingsRefinementService
impl Send for FindingsRefinementService
impl Sync for FindingsRefinementService
impl Unpin for FindingsRefinementService
impl UnsafeUnpin for FindingsRefinementService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request