Struct aws_sdk_cloudtrail::operation::put_insight_selectors::builders::PutInsightSelectorsFluentBuilder
source · pub struct PutInsightSelectorsFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to PutInsightSelectors
.
Lets you enable Insights event logging by specifying the Insights selectors that you want to enable on an existing trail or event data store. You also use PutInsightSelectors
to turn off Insights event logging, by passing an empty list of Insights types. The valid Insights event types are ApiErrorRateInsight
and ApiCallRateInsight
.
To enable Insights on an event data store, you must specify the ARNs (or ID suffix of the ARNs) for the source event data store (EventDataStore
) and the destination event data store (InsightsDestination
). The source event data store logs management events and enables Insights. The destination event data store logs Insights events based upon the management event activity of the source event data store. The source and destination event data stores must belong to the same Amazon Web Services account.
To log Insights events for a trail, you must specify the name (TrailName
) of the CloudTrail trail for which you want to change or add Insights selectors.
To log CloudTrail Insights events on API call volume, the trail or event data store must log write
management events. To log CloudTrail Insights events on API error rate, the trail or event data store must log read
or write
management events. You can call GetEventSelectors
on a trail to check whether the trail logs management events. You can call GetEventDataStore
on an event data store to check whether the event data store logs management events.
For more information, see Logging CloudTrail Insights events in the CloudTrail User Guide.
Implementations§
source§impl PutInsightSelectorsFluentBuilder
impl PutInsightSelectorsFluentBuilder
sourcepub fn as_input(&self) -> &PutInsightSelectorsInputBuilder
pub fn as_input(&self) -> &PutInsightSelectorsInputBuilder
Access the PutInsightSelectors as a reference.
sourcepub async fn send(
self
) -> Result<PutInsightSelectorsOutput, SdkError<PutInsightSelectorsError, HttpResponse>>
pub async fn send( self ) -> Result<PutInsightSelectorsOutput, SdkError<PutInsightSelectorsError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self
) -> CustomizableOperation<PutInsightSelectorsOutput, PutInsightSelectorsError, Self>
pub fn customize( self ) -> CustomizableOperation<PutInsightSelectorsOutput, PutInsightSelectorsError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn trail_name(self, input: impl Into<String>) -> Self
pub fn trail_name(self, input: impl Into<String>) -> Self
The name of the CloudTrail trail for which you want to change or add Insights selectors.
You cannot use this parameter with the EventDataStore
and InsightsDestination
parameters.
sourcepub fn set_trail_name(self, input: Option<String>) -> Self
pub fn set_trail_name(self, input: Option<String>) -> Self
The name of the CloudTrail trail for which you want to change or add Insights selectors.
You cannot use this parameter with the EventDataStore
and InsightsDestination
parameters.
sourcepub fn get_trail_name(&self) -> &Option<String>
pub fn get_trail_name(&self) -> &Option<String>
The name of the CloudTrail trail for which you want to change or add Insights selectors.
You cannot use this parameter with the EventDataStore
and InsightsDestination
parameters.
sourcepub fn insight_selectors(self, input: InsightSelector) -> Self
pub fn insight_selectors(self, input: InsightSelector) -> Self
Appends an item to InsightSelectors
.
To override the contents of this collection use set_insight_selectors
.
A JSON string that contains the Insights types you want to log on a trail or event data store. ApiCallRateInsight
and ApiErrorRateInsight
are valid Insight types.
The ApiCallRateInsight
Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume.
The ApiErrorRateInsight
Insights type analyzes management API calls that result in error codes. The error is shown if the API call is unsuccessful.
sourcepub fn set_insight_selectors(self, input: Option<Vec<InsightSelector>>) -> Self
pub fn set_insight_selectors(self, input: Option<Vec<InsightSelector>>) -> Self
A JSON string that contains the Insights types you want to log on a trail or event data store. ApiCallRateInsight
and ApiErrorRateInsight
are valid Insight types.
The ApiCallRateInsight
Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume.
The ApiErrorRateInsight
Insights type analyzes management API calls that result in error codes. The error is shown if the API call is unsuccessful.
sourcepub fn get_insight_selectors(&self) -> &Option<Vec<InsightSelector>>
pub fn get_insight_selectors(&self) -> &Option<Vec<InsightSelector>>
A JSON string that contains the Insights types you want to log on a trail or event data store. ApiCallRateInsight
and ApiErrorRateInsight
are valid Insight types.
The ApiCallRateInsight
Insights type analyzes write-only management API calls that are aggregated per minute against a baseline API call volume.
The ApiErrorRateInsight
Insights type analyzes management API calls that result in error codes. The error is shown if the API call is unsuccessful.
sourcepub fn event_data_store(self, input: impl Into<String>) -> Self
pub fn event_data_store(self, input: impl Into<String>) -> Self
The ARN (or ID suffix of the ARN) of the source event data store for which you want to change or add Insights selectors. To enable Insights on an event data store, you must provide both the EventDataStore
and InsightsDestination
parameters.
You cannot use this parameter with the TrailName
parameter.
sourcepub fn set_event_data_store(self, input: Option<String>) -> Self
pub fn set_event_data_store(self, input: Option<String>) -> Self
The ARN (or ID suffix of the ARN) of the source event data store for which you want to change or add Insights selectors. To enable Insights on an event data store, you must provide both the EventDataStore
and InsightsDestination
parameters.
You cannot use this parameter with the TrailName
parameter.
sourcepub fn get_event_data_store(&self) -> &Option<String>
pub fn get_event_data_store(&self) -> &Option<String>
The ARN (or ID suffix of the ARN) of the source event data store for which you want to change or add Insights selectors. To enable Insights on an event data store, you must provide both the EventDataStore
and InsightsDestination
parameters.
You cannot use this parameter with the TrailName
parameter.
sourcepub fn insights_destination(self, input: impl Into<String>) -> Self
pub fn insights_destination(self, input: impl Into<String>) -> Self
The ARN (or ID suffix of the ARN) of the destination event data store that logs Insights events. To enable Insights on an event data store, you must provide both the EventDataStore
and InsightsDestination
parameters.
You cannot use this parameter with the TrailName
parameter.
sourcepub fn set_insights_destination(self, input: Option<String>) -> Self
pub fn set_insights_destination(self, input: Option<String>) -> Self
The ARN (or ID suffix of the ARN) of the destination event data store that logs Insights events. To enable Insights on an event data store, you must provide both the EventDataStore
and InsightsDestination
parameters.
You cannot use this parameter with the TrailName
parameter.
sourcepub fn get_insights_destination(&self) -> &Option<String>
pub fn get_insights_destination(&self) -> &Option<String>
The ARN (or ID suffix of the ARN) of the destination event data store that logs Insights events. To enable Insights on an event data store, you must provide both the EventDataStore
and InsightsDestination
parameters.
You cannot use this parameter with the TrailName
parameter.
Trait Implementations§
source§impl Clone for PutInsightSelectorsFluentBuilder
impl Clone for PutInsightSelectorsFluentBuilder
source§fn clone(&self) -> PutInsightSelectorsFluentBuilder
fn clone(&self) -> PutInsightSelectorsFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for PutInsightSelectorsFluentBuilder
impl !RefUnwindSafe for PutInsightSelectorsFluentBuilder
impl Send for PutInsightSelectorsFluentBuilder
impl Sync for PutInsightSelectorsFluentBuilder
impl Unpin for PutInsightSelectorsFluentBuilder
impl !UnwindSafe for PutInsightSelectorsFluentBuilder
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
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more