Skip to main content

aws_sdk_redshift/client/
enable_logging.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 [`EnableLogging`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`cluster_identifier(impl Into<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::cluster_identifier) / [`set_cluster_identifier(Option<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::set_cluster_identifier):<br>required: **true**<br><p>The identifier of the cluster on which logging is to be started.</p> <p>Example: <code>examplecluster</code></p><br>
7    ///   - [`bucket_name(impl Into<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::bucket_name) / [`set_bucket_name(Option<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::set_bucket_name):<br>required: **false**<br><p>The name of an existing S3 bucket where the log files are to be stored.</p> <p>Constraints:</p> <ul>  <li>   <p>Must be in the same region as the cluster</p></li>  <li>   <p>The cluster must have read bucket and put object permissions</p></li> </ul><br>
8    ///   - [`s3_key_prefix(impl Into<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::s3_key_prefix) / [`set_s3_key_prefix(Option<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::set_s3_key_prefix):<br>required: **false**<br><p>The prefix applied to the log file names.</p> <p>Valid characters are any letter from any language, any whitespace character, any numeric character, and the following characters: underscore (<code>_</code>), period (<code>.</code>), colon (<code>:</code>), slash (<code>/</code>), equal (<code>=</code>), plus (<code>+</code>), backslash (<code>\</code>), hyphen (<code>-</code>), at symbol (<code>@</code>).</p><br>
9    ///   - [`log_destination_type(LogDestinationType)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::log_destination_type) / [`set_log_destination_type(Option<LogDestinationType>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::set_log_destination_type):<br>required: **false**<br><p>The log destination type. An enum with possible values of <code>s3</code>, <code>cloudwatch</code>, and <code>s3table</code>.</p><br>
10    ///   - [`log_exports(impl Into<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::log_exports) / [`set_log_exports(Option<Vec::<String>>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::set_log_exports):<br>required: **false**<br><p>The collection of exported log types. When <code>LogDestinationType</code> is <code>s3</code> or <code>cloudwatch</code>, possible values are <code>connectionlog</code>, <code>useractivitylog</code>, and <code>userlog</code>. When <code>LogDestinationType</code> is <code>s3table</code>, the values are the names of the system tables to publish. Omitting this parameter, passing an empty list, or including the value <code>all</code> publishes all current and future system tables.</p><br>
11    ///   - [`s3_table_kms_key_id(impl Into<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::s3_table_kms_key_id) / [`set_s3_table_kms_key_id(Option<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::set_s3_table_kms_key_id):<br>required: **false**<br><p>The identifier of a customer managed KMS key used to encrypt the S3 tables. This parameter is valid only when <code>LogDestinationType</code> is <code>s3table</code>.</p><br>
12    ///   - [`s3_table_granularity(impl Into<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::s3_table_granularity) / [`set_s3_table_granularity(Option<String>)`](crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::set_s3_table_granularity):<br>required: **false**<br><p>The scope of system table publishing. Valid values are <code>cluster</code> and <code>account</code>. A value of <code>cluster</code> scopes publishing to the individual cluster. A value of <code>account</code> scopes publishing to the Amazon Web Services account. This parameter is valid only when <code>LogDestinationType</code> is <code>s3table</code>.</p><br>
13    /// - On success, responds with [`EnableLoggingOutput`](crate::operation::enable_logging::EnableLoggingOutput) with field(s):
14    ///   - [`logging_enabled(Option<bool>)`](crate::operation::enable_logging::EnableLoggingOutput::logging_enabled): <p><code>true</code> if logging is on, <code>false</code> if logging is off.</p>
15    ///   - [`bucket_name(Option<String>)`](crate::operation::enable_logging::EnableLoggingOutput::bucket_name): <p>The name of the S3 bucket where the log files are stored.</p>
16    ///   - [`s3_key_prefix(Option<String>)`](crate::operation::enable_logging::EnableLoggingOutput::s3_key_prefix): <p>The prefix applied to the log file names.</p>
17    ///   - [`last_successful_delivery_time(Option<DateTime>)`](crate::operation::enable_logging::EnableLoggingOutput::last_successful_delivery_time): <p>The last time that logs were delivered.</p>
18    ///   - [`last_failure_time(Option<DateTime>)`](crate::operation::enable_logging::EnableLoggingOutput::last_failure_time): <p>The last time when logs failed to be delivered.</p>
19    ///   - [`last_failure_message(Option<String>)`](crate::operation::enable_logging::EnableLoggingOutput::last_failure_message): <p>The message indicating that logs failed to be delivered.</p>
20    ///   - [`log_destination_type(Option<LogDestinationType>)`](crate::operation::enable_logging::EnableLoggingOutput::log_destination_type): <p>The log destination type. An enum with possible values of <code>s3</code>, <code>cloudwatch</code>, and <code>s3table</code>.</p>
21    ///   - [`log_exports(Option<Vec::<String>>)`](crate::operation::enable_logging::EnableLoggingOutput::log_exports): <p>The collection of exported log types. When <code>LogDestinationType</code> is <code>s3</code> or <code>cloudwatch</code>, possible values are <code>connectionlog</code>, <code>useractivitylog</code>, and <code>userlog</code>. When <code>LogDestinationType</code> is <code>s3table</code>, the values are the names of the system tables being published.</p>
22    ///   - [`s3_tables(Option<S3TablePublishStatus>)`](crate::operation::enable_logging::EnableLoggingOutput::s3_tables): <p>The status of system table publishing to S3 Tables. This field is populated only when system table publishing is active.</p>
23    /// - On failure, responds with [`SdkError<EnableLoggingError>`](crate::operation::enable_logging::EnableLoggingError)
24    pub fn enable_logging(&self) -> crate::operation::enable_logging::builders::EnableLoggingFluentBuilder {
25        crate::operation::enable_logging::builders::EnableLoggingFluentBuilder::new(self.handle.clone())
26    }
27}