Struct aws_sdk_cloudfront::model::LoggingConfig
source · #[non_exhaustive]pub struct LoggingConfig { /* private fields */ }
Expand description
A complex type that controls whether access logs are written for the distribution.
Implementations§
source§impl LoggingConfig
impl LoggingConfig
sourcepub fn enabled(&self) -> Option<bool>
pub fn enabled(&self) -> Option<bool>
Specifies whether you want CloudFront to save access logs to an Amazon S3 bucket. If you don't want to enable logging when you create a distribution or if you want to disable logging for an existing distribution, specify false
for Enabled
, and specify empty Bucket
and Prefix
elements. If you specify false
for Enabled
but you specify values for Bucket
, prefix
, and IncludeCookies
, the values are automatically deleted.
Specifies whether you want CloudFront to include cookies in access logs, specify true
for IncludeCookies
. If you choose to include cookies in logs, CloudFront logs all cookies regardless of how you configure the cache behaviors for this distribution. If you don't want to include cookies when you create a distribution or if you want to disable include cookies for an existing distribution, specify false
for IncludeCookies
.
sourcepub fn bucket(&self) -> Option<&str>
pub fn bucket(&self) -> Option<&str>
The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com
.
sourcepub fn prefix(&self) -> Option<&str>
pub fn prefix(&self) -> Option<&str>
An optional string that you want CloudFront to prefix to the access log filenames
for this distribution, for example, myprefix/
. If you want to enable logging, but you don't want to specify a prefix, you still must include an empty Prefix
element in the Logging
element.
source§impl LoggingConfig
impl LoggingConfig
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture LoggingConfig
.
Examples found in repository?
10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117
pub fn deser_structure_crate_model_logging_config(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoggingConfig, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoggingConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.cloudfront#LoggingConfig$Enabled */ => {
let var_394 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_enabled(var_394);
}
,
s if s.matches("IncludeCookies") /* IncludeCookies com.amazonaws.cloudfront#LoggingConfig$IncludeCookies */ => {
let var_395 =
Some(
{
<bool as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudfront#boolean`)"))
}
?
)
;
builder = builder.set_include_cookies(var_395);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.cloudfront#LoggingConfig$Bucket */ => {
let var_396 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_396);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.cloudfront#LoggingConfig$Prefix */ => {
let var_397 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_397);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for LoggingConfig
impl Clone for LoggingConfig
source§fn clone(&self) -> LoggingConfig
fn clone(&self) -> LoggingConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more