Struct aws_sdk_cloudfront::model::streaming_logging_config::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for StreamingLoggingConfig
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn enabled(self, input: bool) -> Self
pub fn enabled(self, input: bool) -> Self
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 streaming distribution or if you want to disable logging for an existing streaming distribution, specify false
for Enabled
, and specify empty Bucket
and Prefix
elements. If you specify false
for Enabled
but you specify values for Bucket
and Prefix
, the values are automatically deleted.
sourcepub fn set_enabled(self, input: Option<bool>) -> Self
pub fn set_enabled(self, input: Option<bool>) -> Self
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 streaming distribution or if you want to disable logging for an existing streaming distribution, specify false
for Enabled
, and specify empty Bucket
and Prefix
elements. If you specify false
for Enabled
but you specify values for Bucket
and Prefix
, the values are automatically deleted.
Examples found in repository?
10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855
pub fn deser_structure_crate_model_streaming_logging_config(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StreamingLoggingConfig, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::StreamingLoggingConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.cloudfront#StreamingLoggingConfig$Enabled */ => {
let var_437 =
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_437);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.cloudfront#StreamingLoggingConfig$Bucket */ => {
let var_438 =
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_438);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.cloudfront#StreamingLoggingConfig$Prefix */ => {
let var_439 =
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_439);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn bucket(self, input: impl Into<String>) -> Self
pub fn bucket(self, input: impl Into<String>) -> Self
The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com
.
sourcepub fn set_bucket(self, input: Option<String>) -> Self
pub fn set_bucket(self, input: Option<String>) -> Self
The Amazon S3 bucket to store the access logs in, for example, myawslogbucket.s3.amazonaws.com
.
Examples found in repository?
10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855
pub fn deser_structure_crate_model_streaming_logging_config(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StreamingLoggingConfig, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::StreamingLoggingConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.cloudfront#StreamingLoggingConfig$Enabled */ => {
let var_437 =
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_437);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.cloudfront#StreamingLoggingConfig$Bucket */ => {
let var_438 =
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_438);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.cloudfront#StreamingLoggingConfig$Prefix */ => {
let var_439 =
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_439);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn prefix(self, input: impl Into<String>) -> Self
pub fn prefix(self, input: impl Into<String>) -> Self
An optional string that you want CloudFront to prefix to the access log filenames for this streaming 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.
sourcepub fn set_prefix(self, input: Option<String>) -> Self
pub fn set_prefix(self, input: Option<String>) -> Self
An optional string that you want CloudFront to prefix to the access log filenames for this streaming 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.
Examples found in repository?
10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855
pub fn deser_structure_crate_model_streaming_logging_config(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StreamingLoggingConfig, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::StreamingLoggingConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.cloudfront#StreamingLoggingConfig$Enabled */ => {
let var_437 =
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_437);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.cloudfront#StreamingLoggingConfig$Bucket */ => {
let var_438 =
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_438);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.cloudfront#StreamingLoggingConfig$Prefix */ => {
let var_439 =
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_439);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> StreamingLoggingConfig
pub fn build(self) -> StreamingLoggingConfig
Consumes the builder and constructs a StreamingLoggingConfig
.
Examples found in repository?
10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 10821 10822 10823 10824 10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 10848 10849 10850 10851 10852 10853 10854 10855
pub fn deser_structure_crate_model_streaming_logging_config(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StreamingLoggingConfig, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::StreamingLoggingConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.cloudfront#StreamingLoggingConfig$Enabled */ => {
let var_437 =
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_437);
}
,
s if s.matches("Bucket") /* Bucket com.amazonaws.cloudfront#StreamingLoggingConfig$Bucket */ => {
let var_438 =
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_438);
}
,
s if s.matches("Prefix") /* Prefix com.amazonaws.cloudfront#StreamingLoggingConfig$Prefix */ => {
let var_439 =
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_439);
}
,
_ => {}
}
}
Ok(builder.build())
}