#[non_exhaustive]pub struct CreateTrailInputBuilder { /* private fields */ }
Expand description
A builder for CreateTrailInput
.
Implementations§
source§impl CreateTrailInputBuilder
impl CreateTrailInputBuilder
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
Specifies the name of the trail. The name must meet the following requirements:
-
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
-
Start with a letter or number, and end with a letter or number
-
Be between 3 and 128 characters
-
Have no adjacent periods, underscores or dashes. Names like
my-_namespace
andmy--namespace
are not valid. -
Not be in IP address format (for example, 192.168.5.4)
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
Specifies the name of the trail. The name must meet the following requirements:
-
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
-
Start with a letter or number, and end with a letter or number
-
Be between 3 and 128 characters
-
Have no adjacent periods, underscores or dashes. Names like
my-_namespace
andmy--namespace
are not valid. -
Not be in IP address format (for example, 192.168.5.4)
sourcepub fn get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &Option<String>
Specifies the name of the trail. The name must meet the following requirements:
-
Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
-
Start with a letter or number, and end with a letter or number
-
Be between 3 and 128 characters
-
Have no adjacent periods, underscores or dashes. Names like
my-_namespace
andmy--namespace
are not valid. -
Not be in IP address format (for example, 192.168.5.4)
sourcepub fn s3_bucket_name(self, input: impl Into<String>) -> Self
pub fn s3_bucket_name(self, input: impl Into<String>) -> Self
Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
This field is required.sourcepub fn set_s3_bucket_name(self, input: Option<String>) -> Self
pub fn set_s3_bucket_name(self, input: Option<String>) -> Self
Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
sourcepub fn get_s3_bucket_name(&self) -> &Option<String>
pub fn get_s3_bucket_name(&self) -> &Option<String>
Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
sourcepub fn s3_key_prefix(self, input: impl Into<String>) -> Self
pub fn s3_key_prefix(self, input: impl Into<String>) -> Self
Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
sourcepub fn set_s3_key_prefix(self, input: Option<String>) -> Self
pub fn set_s3_key_prefix(self, input: Option<String>) -> Self
Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
sourcepub fn get_s3_key_prefix(&self) -> &Option<String>
pub fn get_s3_key_prefix(&self) -> &Option<String>
Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
sourcepub fn sns_topic_name(self, input: impl Into<String>) -> Self
pub fn sns_topic_name(self, input: impl Into<String>) -> Self
Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
sourcepub fn set_sns_topic_name(self, input: Option<String>) -> Self
pub fn set_sns_topic_name(self, input: Option<String>) -> Self
Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
sourcepub fn get_sns_topic_name(&self) -> &Option<String>
pub fn get_sns_topic_name(&self) -> &Option<String>
Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
sourcepub fn include_global_service_events(self, input: bool) -> Self
pub fn include_global_service_events(self, input: bool) -> Self
Specifies whether the trail is publishing events from global services such as IAM to the log files.
sourcepub fn set_include_global_service_events(self, input: Option<bool>) -> Self
pub fn set_include_global_service_events(self, input: Option<bool>) -> Self
Specifies whether the trail is publishing events from global services such as IAM to the log files.
sourcepub fn get_include_global_service_events(&self) -> &Option<bool>
pub fn get_include_global_service_events(&self) -> &Option<bool>
Specifies whether the trail is publishing events from global services such as IAM to the log files.
sourcepub fn is_multi_region_trail(self, input: bool) -> Self
pub fn is_multi_region_trail(self, input: bool) -> Self
Specifies whether the trail is created in the current Region or in all Regions. The default is false, which creates a trail only in the Region where you are signed in. As a best practice, consider creating trails that log events in all Regions.
sourcepub fn set_is_multi_region_trail(self, input: Option<bool>) -> Self
pub fn set_is_multi_region_trail(self, input: Option<bool>) -> Self
Specifies whether the trail is created in the current Region or in all Regions. The default is false, which creates a trail only in the Region where you are signed in. As a best practice, consider creating trails that log events in all Regions.
sourcepub fn get_is_multi_region_trail(&self) -> &Option<bool>
pub fn get_is_multi_region_trail(&self) -> &Option<bool>
Specifies whether the trail is created in the current Region or in all Regions. The default is false, which creates a trail only in the Region where you are signed in. As a best practice, consider creating trails that log events in all Regions.
sourcepub fn enable_log_file_validation(self, input: bool) -> Self
pub fn enable_log_file_validation(self, input: bool) -> Self
Specifies whether log file integrity validation is enabled. The default is false.
When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.
sourcepub fn set_enable_log_file_validation(self, input: Option<bool>) -> Self
pub fn set_enable_log_file_validation(self, input: Option<bool>) -> Self
Specifies whether log file integrity validation is enabled. The default is false.
When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.
sourcepub fn get_enable_log_file_validation(&self) -> &Option<bool>
pub fn get_enable_log_file_validation(&self) -> &Option<bool>
Specifies whether log file integrity validation is enabled. The default is false.
When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on January 10. The same applies whenever you stop CloudTrail logging or delete a trail.
sourcepub fn cloud_watch_logs_log_group_arn(self, input: impl Into<String>) -> Self
pub fn cloud_watch_logs_log_group_arn(self, input: impl Into<String>) -> Self
Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. You must use a log group that exists in your account.
Not required unless you specify CloudWatchLogsRoleArn
.
sourcepub fn set_cloud_watch_logs_log_group_arn(self, input: Option<String>) -> Self
pub fn set_cloud_watch_logs_log_group_arn(self, input: Option<String>) -> Self
Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. You must use a log group that exists in your account.
Not required unless you specify CloudWatchLogsRoleArn
.
sourcepub fn get_cloud_watch_logs_log_group_arn(&self) -> &Option<String>
pub fn get_cloud_watch_logs_log_group_arn(&self) -> &Option<String>
Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group to which CloudTrail logs will be delivered. You must use a log group that exists in your account.
Not required unless you specify CloudWatchLogsRoleArn
.
sourcepub fn cloud_watch_logs_role_arn(self, input: impl Into<String>) -> Self
pub fn cloud_watch_logs_role_arn(self, input: impl Into<String>) -> Self
Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. You must use a role that exists in your account.
sourcepub fn set_cloud_watch_logs_role_arn(self, input: Option<String>) -> Self
pub fn set_cloud_watch_logs_role_arn(self, input: Option<String>) -> Self
Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. You must use a role that exists in your account.
sourcepub fn get_cloud_watch_logs_role_arn(&self) -> &Option<String>
pub fn get_cloud_watch_logs_role_arn(&self) -> &Option<String>
Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group. You must use a role that exists in your account.
sourcepub fn kms_key_id(self, input: impl Into<String>) -> Self
pub fn kms_key_id(self, input: impl Into<String>) -> Self
Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by alias/
, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.
Examples:
-
alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
-
12345678-1234-1234-1234-123456789012
sourcepub fn set_kms_key_id(self, input: Option<String>) -> Self
pub fn set_kms_key_id(self, input: Option<String>) -> Self
Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by alias/
, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.
Examples:
-
alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
-
12345678-1234-1234-1234-123456789012
sourcepub fn get_kms_key_id(&self) -> &Option<String>
pub fn get_kms_key_id(&self) -> &Option<String>
Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The value can be an alias name prefixed by alias/
, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.
CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.
Examples:
-
alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
-
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
-
12345678-1234-1234-1234-123456789012
sourcepub fn is_organization_trail(self, input: bool) -> Self
pub fn is_organization_trail(self, input: bool) -> Self
Specifies whether the trail is created for all accounts in an organization in Organizations, or only for the current Amazon Web Services account. The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account or delegated administrator account for an organization in Organizations.
sourcepub fn set_is_organization_trail(self, input: Option<bool>) -> Self
pub fn set_is_organization_trail(self, input: Option<bool>) -> Self
Specifies whether the trail is created for all accounts in an organization in Organizations, or only for the current Amazon Web Services account. The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account or delegated administrator account for an organization in Organizations.
sourcepub fn get_is_organization_trail(&self) -> &Option<bool>
pub fn get_is_organization_trail(&self) -> &Option<bool>
Specifies whether the trail is created for all accounts in an organization in Organizations, or only for the current Amazon Web Services account. The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account or delegated administrator account for an organization in Organizations.
Appends an item to tags_list
.
To override the contents of this collection use set_tags_list
.
A list of tags.
A list of tags.
A list of tags.
sourcepub fn build(self) -> Result<CreateTrailInput, BuildError>
pub fn build(self) -> Result<CreateTrailInput, BuildError>
Consumes the builder and constructs a CreateTrailInput
.
source§impl CreateTrailInputBuilder
impl CreateTrailInputBuilder
sourcepub async fn send_with(
self,
client: &Client
) -> Result<CreateTrailOutput, SdkError<CreateTrailError, HttpResponse>>
pub async fn send_with( self, client: &Client ) -> Result<CreateTrailOutput, SdkError<CreateTrailError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for CreateTrailInputBuilder
impl Clone for CreateTrailInputBuilder
source§fn clone(&self) -> CreateTrailInputBuilder
fn clone(&self) -> CreateTrailInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateTrailInputBuilder
impl Debug for CreateTrailInputBuilder
source§impl Default for CreateTrailInputBuilder
impl Default for CreateTrailInputBuilder
source§fn default() -> CreateTrailInputBuilder
fn default() -> CreateTrailInputBuilder
source§impl PartialEq for CreateTrailInputBuilder
impl PartialEq for CreateTrailInputBuilder
source§fn eq(&self, other: &CreateTrailInputBuilder) -> bool
fn eq(&self, other: &CreateTrailInputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CreateTrailInputBuilder
Auto Trait Implementations§
impl Freeze for CreateTrailInputBuilder
impl RefUnwindSafe for CreateTrailInputBuilder
impl Send for CreateTrailInputBuilder
impl Sync for CreateTrailInputBuilder
impl Unpin for CreateTrailInputBuilder
impl UnwindSafe for CreateTrailInputBuilder
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