1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateEventDataStore`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`name(impl Into<String>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_name):<br>required: **true**<br><p>The name of the event data store.</p><br>
    ///   - [`advanced_event_selectors(AdvancedEventSelector)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::advanced_event_selectors) / [`set_advanced_event_selectors(Option<Vec::<AdvancedEventSelector>>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_advanced_event_selectors):<br>required: **false**<br><p>The advanced event selectors to use to select the events for the data store. You can configure up to five advanced event selectors for each event data store.</p> <p>For more information about how to use advanced event selectors to log CloudTrail events, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html#creating-data-event-selectors-advanced">Log events by using advanced event selectors</a> in the CloudTrail User Guide.</p> <p>For more information about how to use advanced event selectors to include Config configuration items in your event data store, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-lake-cli.html#lake-cli-create-eds-config">Create an event data store for Config configuration items</a> in the CloudTrail User Guide.</p> <p>For more information about how to use advanced event selectors to include non-Amazon Web Services events in your event data store, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-lake-cli.html#lake-cli-create-integration">Create an integration to log events from outside Amazon Web Services</a> in the CloudTrail User Guide.</p><br>
    ///   - [`multi_region_enabled(bool)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::multi_region_enabled) / [`set_multi_region_enabled(Option<bool>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_multi_region_enabled):<br>required: **false**<br><p>Specifies whether the event data store includes events from all Regions, or only from the Region in which the event data store is created.</p><br>
    ///   - [`organization_enabled(bool)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::organization_enabled) / [`set_organization_enabled(Option<bool>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_organization_enabled):<br>required: **false**<br><p>Specifies whether an event data store collects events logged for an organization in Organizations.</p><br>
    ///   - [`retention_period(i32)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::retention_period) / [`set_retention_period(Option<i32>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_retention_period):<br>required: **false**<br><p>The retention period of the event data store, in days. If <code>BillingMode</code> is set to <code>EXTENDABLE_RETENTION_PRICING</code>, you can set a retention period of up to 3653 days, the equivalent of 10 years. If <code>BillingMode</code> is set to <code>FIXED_RETENTION_PRICING</code>, you can set a retention period of up to 2557 days, the equivalent of seven years.</p> <p>CloudTrail Lake determines whether to retain an event by checking if the <code>eventTime</code> of the event is within the specified retention period. For example, if you set a retention period of 90 days, CloudTrail will remove events when the <code>eventTime</code> is older than 90 days.</p><note>  <p>If you plan to copy trail events to this event data store, we recommend that you consider both the age of the events that you want to copy as well as how long you want to keep the copied events in your event data store. For example, if you copy trail events that are 5 years old and specify a retention period of 7 years, the event data store will retain those events for two years.</p> </note><br>
    ///   - [`termination_protection_enabled(bool)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::termination_protection_enabled) / [`set_termination_protection_enabled(Option<bool>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_termination_protection_enabled):<br>required: **false**<br><p>Specifies whether termination protection is enabled for the event data store. If termination protection is enabled, you cannot delete the event data store until termination protection is disabled.</p><br>
    ///   - [`tags_list(Tag)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::tags_list) / [`set_tags_list(Option<Vec::<Tag>>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_tags_list):<br>required: **false**<br><p>A list of tags.</p><br>
    ///   - [`kms_key_id(impl Into<String>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::kms_key_id) / [`set_kms_key_id(Option<String>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_kms_key_id):<br>required: **false**<br><p>Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail. The value can be an alias name prefixed by <code>alias/</code>, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.</p><important>  <p>Disabling or deleting the KMS key, or removing CloudTrail permissions on the key, prevents CloudTrail from logging events to the event data store, and prevents users from querying the data in the event data store that was encrypted with the key. After you associate an event data store with a KMS key, the KMS key cannot be removed or changed. Before you disable or delete a KMS key that you are using with an event data store, delete or back up your event data store.</p> </important> <p>CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Using multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>.</p> <p>Examples:</p> <ul>  <li>   <p><code>alias/MyAliasName</code></p></li>  <li>   <p><code>arn:aws:kms:us-east-2:123456789012:alias/MyAliasName</code></p></li>  <li>   <p><code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code></p></li>  <li>   <p><code>12345678-1234-1234-1234-123456789012</code></p></li> </ul><br>
    ///   - [`start_ingestion(bool)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::start_ingestion) / [`set_start_ingestion(Option<bool>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_start_ingestion):<br>required: **false**<br><p>Specifies whether the event data store should start ingesting live events. The default is true.</p><br>
    ///   - [`billing_mode(BillingMode)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::billing_mode) / [`set_billing_mode(Option<BillingMode>)`](crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::set_billing_mode):<br>required: **false**<br><p>The billing mode for the event data store determines the cost for ingesting events and the default and maximum retention period for the event data store.</p> <p>The following are the possible values:</p> <ul>  <li>   <p><code>EXTENDABLE_RETENTION_PRICING</code> - This billing mode is generally recommended if you want a flexible retention period of up to 3653 days (about 10 years). The default retention period for this billing mode is 366 days.</p></li>  <li>   <p><code>FIXED_RETENTION_PRICING</code> - This billing mode is recommended if you expect to ingest more than 25 TB of event data per month and need a retention period of up to 2557 days (about 7 years). The default retention period for this billing mode is 2557 days.</p></li> </ul> <p>The default value is <code>EXTENDABLE_RETENTION_PRICING</code>.</p> <p>For more information about CloudTrail pricing, see <a href="http://aws.amazon.com/cloudtrail/pricing/">CloudTrail Pricing</a> and <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-manage-costs.html">Managing CloudTrail Lake costs</a>.</p><br>
    /// - On success, responds with [`CreateEventDataStoreOutput`](crate::operation::create_event_data_store::CreateEventDataStoreOutput) with field(s):
    ///   - [`event_data_store_arn(Option<String>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::event_data_store_arn): <p>The ARN of the event data store.</p>
    ///   - [`name(Option<String>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::name): <p>The name of the event data store.</p>
    ///   - [`status(Option<EventDataStoreStatus>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::status): <p>The status of event data store creation.</p>
    ///   - [`advanced_event_selectors(Option<Vec::<AdvancedEventSelector>>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::advanced_event_selectors): <p>The advanced event selectors that were used to select the events for the data store.</p>
    ///   - [`multi_region_enabled(Option<bool>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::multi_region_enabled): <p>Indicates whether the event data store collects events from all Regions, or only from the Region in which it was created.</p>
    ///   - [`organization_enabled(Option<bool>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::organization_enabled): <p>Indicates whether an event data store is collecting logged events for an organization in Organizations.</p>
    ///   - [`retention_period(Option<i32>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::retention_period): <p>The retention period of an event data store, in days.</p>
    ///   - [`termination_protection_enabled(Option<bool>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::termination_protection_enabled): <p>Indicates whether termination protection is enabled for the event data store.</p>
    ///   - [`tags_list(Option<Vec::<Tag>>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::tags_list): <p>A list of tags.</p>
    ///   - [`created_timestamp(Option<DateTime>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::created_timestamp): <p>The timestamp that shows when the event data store was created.</p>
    ///   - [`updated_timestamp(Option<DateTime>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::updated_timestamp): <p>The timestamp that shows when an event data store was updated, if applicable. <code>UpdatedTimestamp</code> is always either the same or newer than the time shown in <code>CreatedTimestamp</code>.</p>
    ///   - [`kms_key_id(Option<String>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::kms_key_id): <p>Specifies the KMS key ID that encrypts the events delivered by CloudTrail. The value is a fully specified ARN to a KMS key in the following format.</p> <p><code>arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012</code></p>
    ///   - [`billing_mode(Option<BillingMode>)`](crate::operation::create_event_data_store::CreateEventDataStoreOutput::billing_mode): <p>The billing mode for the event data store.</p>
    /// - On failure, responds with [`SdkError<CreateEventDataStoreError>`](crate::operation::create_event_data_store::CreateEventDataStoreError)
    pub fn create_event_data_store(&self) -> crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder {
        crate::operation::create_event_data_store::builders::CreateEventDataStoreFluentBuilder::new(self.handle.clone())
    }
}