aws_sdk_cloudtrail/client/put_event_selectors.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`PutEventSelectors`](crate::operation::put_event_selectors::builders::PutEventSelectorsFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`trail_name(impl Into<String>)`](crate::operation::put_event_selectors::builders::PutEventSelectorsFluentBuilder::trail_name) / [`set_trail_name(Option<String>)`](crate::operation::put_event_selectors::builders::PutEventSelectorsFluentBuilder::set_trail_name):<br>required: **true**<br><p>Specifies the name of the trail or trail ARN. If you specify a trail name, the string must meet the following requirements:</p> <ul> <li> <p>Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)</p></li> <li> <p>Start with a letter or number, and end with a letter or number</p></li> <li> <p>Be between 3 and 128 characters</p></li> <li> <p>Have no adjacent periods, underscores or dashes. Names like <code>my-_namespace</code> and <code>my--namespace</code> are not valid.</p></li> <li> <p>Not be in IP address format (for example, 192.168.5.4)</p></li> </ul> <p>If you specify a trail ARN, it must be in the following format.</p> <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p><br>
7 /// - [`event_selectors(EventSelector)`](crate::operation::put_event_selectors::builders::PutEventSelectorsFluentBuilder::event_selectors) / [`set_event_selectors(Option<Vec::<EventSelector>>)`](crate::operation::put_event_selectors::builders::PutEventSelectorsFluentBuilder::set_event_selectors):<br>required: **false**<br><p>Specifies the settings for your event selectors. You can use event selectors to log management events and data events for the following resource types:</p> <ul> <li> <p><code>AWS::DynamoDB::Table</code></p></li> <li> <p><code>AWS::Lambda::Function</code></p></li> <li> <p><code>AWS::S3::Object</code></p></li> </ul> <p>You can't use event selectors to log network activity events.</p> <p>You can configure up to five event selectors for a trail. You can use either <code>EventSelectors</code> or <code>AdvancedEventSelectors</code> in a <code>PutEventSelectors</code> request, but not both. If you apply <code>EventSelectors</code> to a trail, any existing <code>AdvancedEventSelectors</code> are overwritten.</p><br>
8 /// - [`advanced_event_selectors(AdvancedEventSelector)`](crate::operation::put_event_selectors::builders::PutEventSelectorsFluentBuilder::advanced_event_selectors) / [`set_advanced_event_selectors(Option<Vec::<AdvancedEventSelector>>)`](crate::operation::put_event_selectors::builders::PutEventSelectorsFluentBuilder::set_advanced_event_selectors):<br>required: **false**<br><p>Specifies the settings for advanced event selectors. You can use advanced event selectors to log management events, data events for all resource types, and network activity events.</p> <p>You can add advanced event selectors, and conditions for your advanced event selectors, up to a maximum of 500 values for all conditions and selectors on a trail. You can use either <code>AdvancedEventSelectors</code> or <code>EventSelectors</code>, but not both. If you apply <code>AdvancedEventSelectors</code> to a trail, any existing <code>EventSelectors</code> are overwritten. For more information about advanced event selectors, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html">Logging data events</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-network-events-with-cloudtrail.html">Logging network activity events</a> in the <i>CloudTrail User Guide</i>.</p><br>
9 /// - On success, responds with [`PutEventSelectorsOutput`](crate::operation::put_event_selectors::PutEventSelectorsOutput) with field(s):
10 /// - [`trail_arn(Option<String>)`](crate::operation::put_event_selectors::PutEventSelectorsOutput::trail_arn): <p>Specifies the ARN of the trail that was updated with event selectors. The following is the format of a trail ARN.</p> <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
11 /// - [`event_selectors(Option<Vec::<EventSelector>>)`](crate::operation::put_event_selectors::PutEventSelectorsOutput::event_selectors): <p>Specifies the event selectors configured for your trail.</p>
12 /// - [`advanced_event_selectors(Option<Vec::<AdvancedEventSelector>>)`](crate::operation::put_event_selectors::PutEventSelectorsOutput::advanced_event_selectors): <p>Specifies the advanced event selectors configured for your trail.</p>
13 /// - On failure, responds with [`SdkError<PutEventSelectorsError>`](crate::operation::put_event_selectors::PutEventSelectorsError)
14 pub fn put_event_selectors(&self) -> crate::operation::put_event_selectors::builders::PutEventSelectorsFluentBuilder {
15 crate::operation::put_event_selectors::builders::PutEventSelectorsFluentBuilder::new(self.handle.clone())
16 }
17}