Struct aws_sdk_s3::model::logging_enabled::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for LoggingEnabled
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn target_bucket(self, input: impl Into<String>) -> Self
pub fn target_bucket(self, input: impl Into<String>) -> Self
Specifies the bucket where you want Amazon S3 to store server access logs. You can have your logs delivered to any bucket that you own, including the same bucket that is being logged. You can also configure multiple buckets to deliver their logs to the same target bucket. In this case, you should choose a different TargetPrefix
for each source bucket so that the delivered log files can be distinguished by key.
sourcepub fn set_target_bucket(self, input: Option<String>) -> Self
pub fn set_target_bucket(self, input: Option<String>) -> Self
Specifies the bucket where you want Amazon S3 to store server access logs. You can have your logs delivered to any bucket that you own, including the same bucket that is being logged. You can also configure multiple buckets to deliver their logs to the same target bucket. In this case, you should choose a different TargetPrefix
for each source bucket so that the delivered log files can be distinguished by key.
Examples found in repository?
3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388
pub fn deser_structure_crate_model_logging_enabled(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoggingEnabled, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoggingEnabled::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("TargetBucket") /* TargetBucket com.amazonaws.s3#LoggingEnabled$TargetBucket */ => {
let var_181 =
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_target_bucket(var_181);
}
,
s if s.matches("TargetGrants") /* TargetGrants com.amazonaws.s3#LoggingEnabled$TargetGrants */ => {
let var_182 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_target_grants(&mut tag)
?
)
;
builder = builder.set_target_grants(var_182);
}
,
s if s.matches("TargetPrefix") /* TargetPrefix com.amazonaws.s3#LoggingEnabled$TargetPrefix */ => {
let var_183 =
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_target_prefix(var_183);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn target_grants(self, input: TargetGrant) -> Self
pub fn target_grants(self, input: TargetGrant) -> Self
Appends an item to target_grants
.
To override the contents of this collection use set_target_grants
.
Container for granting information.
Buckets that use the bucket owner enforced setting for Object Ownership don't support target grants. For more information, see Permissions for server access log delivery in the Amazon S3 User Guide.
sourcepub fn set_target_grants(self, input: Option<Vec<TargetGrant>>) -> Self
pub fn set_target_grants(self, input: Option<Vec<TargetGrant>>) -> Self
Container for granting information.
Buckets that use the bucket owner enforced setting for Object Ownership don't support target grants. For more information, see Permissions for server access log delivery in the Amazon S3 User Guide.
Examples found in repository?
3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388
pub fn deser_structure_crate_model_logging_enabled(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoggingEnabled, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoggingEnabled::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("TargetBucket") /* TargetBucket com.amazonaws.s3#LoggingEnabled$TargetBucket */ => {
let var_181 =
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_target_bucket(var_181);
}
,
s if s.matches("TargetGrants") /* TargetGrants com.amazonaws.s3#LoggingEnabled$TargetGrants */ => {
let var_182 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_target_grants(&mut tag)
?
)
;
builder = builder.set_target_grants(var_182);
}
,
s if s.matches("TargetPrefix") /* TargetPrefix com.amazonaws.s3#LoggingEnabled$TargetPrefix */ => {
let var_183 =
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_target_prefix(var_183);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn target_prefix(self, input: impl Into<String>) -> Self
pub fn target_prefix(self, input: impl Into<String>) -> Self
A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.
sourcepub fn set_target_prefix(self, input: Option<String>) -> Self
pub fn set_target_prefix(self, input: Option<String>) -> Self
A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a single bucket, you can use a prefix to distinguish which log files came from which bucket.
Examples found in repository?
3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388
pub fn deser_structure_crate_model_logging_enabled(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoggingEnabled, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoggingEnabled::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("TargetBucket") /* TargetBucket com.amazonaws.s3#LoggingEnabled$TargetBucket */ => {
let var_181 =
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_target_bucket(var_181);
}
,
s if s.matches("TargetGrants") /* TargetGrants com.amazonaws.s3#LoggingEnabled$TargetGrants */ => {
let var_182 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_target_grants(&mut tag)
?
)
;
builder = builder.set_target_grants(var_182);
}
,
s if s.matches("TargetPrefix") /* TargetPrefix com.amazonaws.s3#LoggingEnabled$TargetPrefix */ => {
let var_183 =
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_target_prefix(var_183);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> LoggingEnabled
pub fn build(self) -> LoggingEnabled
Consumes the builder and constructs a LoggingEnabled
.
Examples found in repository?
3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388
pub fn deser_structure_crate_model_logging_enabled(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoggingEnabled, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoggingEnabled::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("TargetBucket") /* TargetBucket com.amazonaws.s3#LoggingEnabled$TargetBucket */ => {
let var_181 =
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_target_bucket(var_181);
}
,
s if s.matches("TargetGrants") /* TargetGrants com.amazonaws.s3#LoggingEnabled$TargetGrants */ => {
let var_182 =
Some(
crate::xml_deser::deser_list_com_amazonaws_s3_target_grants(&mut tag)
?
)
;
builder = builder.set_target_grants(var_182);
}
,
s if s.matches("TargetPrefix") /* TargetPrefix com.amazonaws.s3#LoggingEnabled$TargetPrefix */ => {
let var_183 =
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_target_prefix(var_183);
}
,
_ => {}
}
}
Ok(builder.build())
}