#[non_exhaustive]
pub struct CreateTrailInputBuilder { /* private fields */ }
Expand description

A builder for CreateTrailInput.

Implementations§

source§

impl CreateTrailInputBuilder

source

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 and my--namespace are not valid.

  • Not be in IP address format (for example, 192.168.5.4)

This field is required.
source

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 and my--namespace are not valid.

  • Not be in IP address format (for example, 192.168.5.4)

source

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 and my--namespace are not valid.

  • Not be in IP address format (for example, 192.168.5.4)

source

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.
source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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

source

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

source

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

source

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.

source

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.

source

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.

source

pub fn tags_list(self, input: Tag) -> Self

Appends an item to tags_list.

To override the contents of this collection use set_tags_list.

A list of tags.

source

pub fn set_tags_list(self, input: Option<Vec<Tag>>) -> Self

A list of tags.

source

pub fn get_tags_list(&self) -> &Option<Vec<Tag>>

A list of tags.

source

pub fn build(self) -> Result<CreateTrailInput, BuildError>

Consumes the builder and constructs a CreateTrailInput.

source§

impl CreateTrailInputBuilder

source

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

source§

fn clone(&self) -> CreateTrailInputBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CreateTrailInputBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CreateTrailInputBuilder

source§

fn default() -> CreateTrailInputBuilder

Returns the “default value” for a type. Read more
source§

impl PartialEq for CreateTrailInputBuilder

source§

fn eq(&self, other: &CreateTrailInputBuilder) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for CreateTrailInputBuilder

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more