aws_sdk_eventbridge/client/create_archive.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 [`CreateArchive`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`archive_name(impl Into<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::archive_name) / [`set_archive_name(Option<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::set_archive_name):<br>required: **true**<br><p>The name for the archive to create.</p><br>
7 /// - [`event_source_arn(impl Into<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::event_source_arn) / [`set_event_source_arn(Option<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::set_event_source_arn):<br>required: **true**<br><p>The ARN of the event bus that sends events to the archive.</p><br>
8 /// - [`description(impl Into<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::set_description):<br>required: **false**<br><p>A description for the archive.</p><br>
9 /// - [`event_pattern(impl Into<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::event_pattern) / [`set_event_pattern(Option<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::set_event_pattern):<br>required: **false**<br><p>An event pattern to use to filter events sent to the archive.</p><br>
10 /// - [`retention_days(i32)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::retention_days) / [`set_retention_days(Option<i32>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::set_retention_days):<br>required: **false**<br><p>The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely</p><br>
11 /// - [`kms_key_identifier(impl Into<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::kms_key_identifier) / [`set_kms_key_identifier(Option<String>)`](crate::operation::create_archive::builders::CreateArchiveFluentBuilder::set_kms_key_identifier):<br>required: **false**<br><p>The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this archive. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN.</p> <p>If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the archive.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html">Identify and view keys</a> in the <i>Key Management Service Developer Guide</i>.</p><important> <p>If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/encryption-archives.html">Encrypting archives</a> in the <i>Amazon EventBridge User Guide</i>.</p> </important><br>
12 /// - On success, responds with [`CreateArchiveOutput`](crate::operation::create_archive::CreateArchiveOutput) with field(s):
13 /// - [`archive_arn(Option<String>)`](crate::operation::create_archive::CreateArchiveOutput::archive_arn): <p>The ARN of the archive that was created.</p>
14 /// - [`state(Option<ArchiveState>)`](crate::operation::create_archive::CreateArchiveOutput::state): <p>The state of the archive that was created.</p>
15 /// - [`state_reason(Option<String>)`](crate::operation::create_archive::CreateArchiveOutput::state_reason): <p>The reason that the archive is in the state.</p>
16 /// - [`creation_time(Option<DateTime>)`](crate::operation::create_archive::CreateArchiveOutput::creation_time): <p>The time at which the archive was created.</p>
17 /// - On failure, responds with [`SdkError<CreateArchiveError>`](crate::operation::create_archive::CreateArchiveError)
18 pub fn create_archive(&self) -> crate::operation::create_archive::builders::CreateArchiveFluentBuilder {
19 crate::operation::create_archive::builders::CreateArchiveFluentBuilder::new(self.handle.clone())
20 }
21}