Skip to main content

aws_sdk_wafv2/operation/get_logging_configuration/
_get_logging_configuration_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetLoggingConfigurationInput {
6    /// <p>The Amazon Resource Name (ARN) of the web ACL for which you want to get the <code>LoggingConfiguration</code>.</p>
7    pub resource_arn: ::std::option::Option<::std::string::String>,
8    /// <p>Used to distinguish between various logging options. Currently, there is one option.</p>
9    /// <p>Default: <code>WAF_LOGS</code></p>
10    pub log_type: ::std::option::Option<crate::types::LogType>,
11    /// <p>The owner of the logging configuration, which must be set to <code>CUSTOMER</code> for the configurations that you manage.</p>
12    /// <p>The log scope <code>SECURITY_LAKE</code> indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see <a href="https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html">Collecting data from Amazon Web Services services</a> in the <i>Amazon Security Lake user guide</i>.</p>
13    /// <p>The log scope <code>CLOUDWATCH_TELEMETRY_RULE_MANAGED</code> indicates a configuration that is managed through Amazon CloudWatch Logs for telemetry data collection and analysis. For information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html">What is Amazon CloudWatch Logs ?</a> in the <i>Amazon CloudWatch Logs user guide</i>.</p>
14    /// <p>Default: <code>CUSTOMER</code></p>
15    pub log_scope: ::std::option::Option<crate::types::LogScope>,
16}
17impl GetLoggingConfigurationInput {
18    /// <p>The Amazon Resource Name (ARN) of the web ACL for which you want to get the <code>LoggingConfiguration</code>.</p>
19    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
20        self.resource_arn.as_deref()
21    }
22    /// <p>Used to distinguish between various logging options. Currently, there is one option.</p>
23    /// <p>Default: <code>WAF_LOGS</code></p>
24    pub fn log_type(&self) -> ::std::option::Option<&crate::types::LogType> {
25        self.log_type.as_ref()
26    }
27    /// <p>The owner of the logging configuration, which must be set to <code>CUSTOMER</code> for the configurations that you manage.</p>
28    /// <p>The log scope <code>SECURITY_LAKE</code> indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see <a href="https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html">Collecting data from Amazon Web Services services</a> in the <i>Amazon Security Lake user guide</i>.</p>
29    /// <p>The log scope <code>CLOUDWATCH_TELEMETRY_RULE_MANAGED</code> indicates a configuration that is managed through Amazon CloudWatch Logs for telemetry data collection and analysis. For information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html">What is Amazon CloudWatch Logs ?</a> in the <i>Amazon CloudWatch Logs user guide</i>.</p>
30    /// <p>Default: <code>CUSTOMER</code></p>
31    pub fn log_scope(&self) -> ::std::option::Option<&crate::types::LogScope> {
32        self.log_scope.as_ref()
33    }
34}
35impl GetLoggingConfigurationInput {
36    /// Creates a new builder-style object to manufacture [`GetLoggingConfigurationInput`](crate::operation::get_logging_configuration::GetLoggingConfigurationInput).
37    pub fn builder() -> crate::operation::get_logging_configuration::builders::GetLoggingConfigurationInputBuilder {
38        crate::operation::get_logging_configuration::builders::GetLoggingConfigurationInputBuilder::default()
39    }
40}
41
42/// A builder for [`GetLoggingConfigurationInput`](crate::operation::get_logging_configuration::GetLoggingConfigurationInput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct GetLoggingConfigurationInputBuilder {
46    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
47    pub(crate) log_type: ::std::option::Option<crate::types::LogType>,
48    pub(crate) log_scope: ::std::option::Option<crate::types::LogScope>,
49}
50impl GetLoggingConfigurationInputBuilder {
51    /// <p>The Amazon Resource Name (ARN) of the web ACL for which you want to get the <code>LoggingConfiguration</code>.</p>
52    /// This field is required.
53    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.resource_arn = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The Amazon Resource Name (ARN) of the web ACL for which you want to get the <code>LoggingConfiguration</code>.</p>
58    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.resource_arn = input;
60        self
61    }
62    /// <p>The Amazon Resource Name (ARN) of the web ACL for which you want to get the <code>LoggingConfiguration</code>.</p>
63    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
64        &self.resource_arn
65    }
66    /// <p>Used to distinguish between various logging options. Currently, there is one option.</p>
67    /// <p>Default: <code>WAF_LOGS</code></p>
68    pub fn log_type(mut self, input: crate::types::LogType) -> Self {
69        self.log_type = ::std::option::Option::Some(input);
70        self
71    }
72    /// <p>Used to distinguish between various logging options. Currently, there is one option.</p>
73    /// <p>Default: <code>WAF_LOGS</code></p>
74    pub fn set_log_type(mut self, input: ::std::option::Option<crate::types::LogType>) -> Self {
75        self.log_type = input;
76        self
77    }
78    /// <p>Used to distinguish between various logging options. Currently, there is one option.</p>
79    /// <p>Default: <code>WAF_LOGS</code></p>
80    pub fn get_log_type(&self) -> &::std::option::Option<crate::types::LogType> {
81        &self.log_type
82    }
83    /// <p>The owner of the logging configuration, which must be set to <code>CUSTOMER</code> for the configurations that you manage.</p>
84    /// <p>The log scope <code>SECURITY_LAKE</code> indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see <a href="https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html">Collecting data from Amazon Web Services services</a> in the <i>Amazon Security Lake user guide</i>.</p>
85    /// <p>The log scope <code>CLOUDWATCH_TELEMETRY_RULE_MANAGED</code> indicates a configuration that is managed through Amazon CloudWatch Logs for telemetry data collection and analysis. For information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html">What is Amazon CloudWatch Logs ?</a> in the <i>Amazon CloudWatch Logs user guide</i>.</p>
86    /// <p>Default: <code>CUSTOMER</code></p>
87    pub fn log_scope(mut self, input: crate::types::LogScope) -> Self {
88        self.log_scope = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>The owner of the logging configuration, which must be set to <code>CUSTOMER</code> for the configurations that you manage.</p>
92    /// <p>The log scope <code>SECURITY_LAKE</code> indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see <a href="https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html">Collecting data from Amazon Web Services services</a> in the <i>Amazon Security Lake user guide</i>.</p>
93    /// <p>The log scope <code>CLOUDWATCH_TELEMETRY_RULE_MANAGED</code> indicates a configuration that is managed through Amazon CloudWatch Logs for telemetry data collection and analysis. For information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html">What is Amazon CloudWatch Logs ?</a> in the <i>Amazon CloudWatch Logs user guide</i>.</p>
94    /// <p>Default: <code>CUSTOMER</code></p>
95    pub fn set_log_scope(mut self, input: ::std::option::Option<crate::types::LogScope>) -> Self {
96        self.log_scope = input;
97        self
98    }
99    /// <p>The owner of the logging configuration, which must be set to <code>CUSTOMER</code> for the configurations that you manage.</p>
100    /// <p>The log scope <code>SECURITY_LAKE</code> indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see <a href="https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html">Collecting data from Amazon Web Services services</a> in the <i>Amazon Security Lake user guide</i>.</p>
101    /// <p>The log scope <code>CLOUDWATCH_TELEMETRY_RULE_MANAGED</code> indicates a configuration that is managed through Amazon CloudWatch Logs for telemetry data collection and analysis. For information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html">What is Amazon CloudWatch Logs ?</a> in the <i>Amazon CloudWatch Logs user guide</i>.</p>
102    /// <p>Default: <code>CUSTOMER</code></p>
103    pub fn get_log_scope(&self) -> &::std::option::Option<crate::types::LogScope> {
104        &self.log_scope
105    }
106    /// Consumes the builder and constructs a [`GetLoggingConfigurationInput`](crate::operation::get_logging_configuration::GetLoggingConfigurationInput).
107    pub fn build(
108        self,
109    ) -> ::std::result::Result<
110        crate::operation::get_logging_configuration::GetLoggingConfigurationInput,
111        ::aws_smithy_types::error::operation::BuildError,
112    > {
113        ::std::result::Result::Ok(crate::operation::get_logging_configuration::GetLoggingConfigurationInput {
114            resource_arn: self.resource_arn,
115            log_type: self.log_type,
116            log_scope: self.log_scope,
117        })
118    }
119}