#[non_exhaustive]pub struct PublicAccessBlockConfiguration { /* private fields */ }
Expand description
The PublicAccessBlock
configuration that you want to apply to this Amazon S3 account. You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.
This is not supported for Amazon S3 on Outposts.
Implementations§
source§impl PublicAccessBlockConfiguration
impl PublicAccessBlockConfiguration
sourcepub fn block_public_acls(&self) -> bool
pub fn block_public_acls(&self) -> bool
Specifies whether Amazon S3 should block public access control lists (ACLs) for buckets in this account. Setting this element to TRUE
causes the following behavior:
-
PUT Bucket acl and PUT Object acl calls fail if the specified ACL is public.
-
PUT Object calls fail if the request includes a public ACL.
-
PUT Bucket calls fail if the request includes a public ACL.
Enabling this setting doesn't affect existing policies or ACLs.
This is not supported for Amazon S3 on Outposts.
sourcepub fn ignore_public_acls(&self) -> bool
pub fn ignore_public_acls(&self) -> bool
Specifies whether Amazon S3 should ignore public ACLs for buckets in this account. Setting this element to TRUE
causes Amazon S3 to ignore all public ACLs on buckets in this account and any objects that they contain.
Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't prevent new public ACLs from being set.
This is not supported for Amazon S3 on Outposts.
sourcepub fn block_public_policy(&self) -> bool
pub fn block_public_policy(&self) -> bool
Specifies whether Amazon S3 should block public bucket policies for buckets in this account. Setting this element to TRUE
causes Amazon S3 to reject calls to PUT Bucket policy if the specified bucket policy allows public access.
Enabling this setting doesn't affect existing bucket policies.
This is not supported for Amazon S3 on Outposts.
sourcepub fn restrict_public_buckets(&self) -> bool
pub fn restrict_public_buckets(&self) -> bool
Specifies whether Amazon S3 should restrict public bucket policies for buckets in this account. Setting this element to TRUE
restricts access to buckets with public policies to only Amazon Web Service principals and authorized users within this account.
Enabling this setting doesn't affect previously stored bucket policies, except that public and cross-account access within any public bucket policy, including non-public delegation to specific accounts, is blocked.
This is not supported for Amazon S3 on Outposts.
source§impl PublicAccessBlockConfiguration
impl PublicAccessBlockConfiguration
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture PublicAccessBlockConfiguration
.
Examples found in repository?
2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516
pub fn deser_structure_crate_model_public_access_block_configuration(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PublicAccessBlockConfiguration, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::PublicAccessBlockConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("BlockPublicAcls") /* BlockPublicAcls com.amazonaws.s3control#PublicAccessBlockConfiguration$BlockPublicAcls */ => {
let var_96 =
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.s3control#Setting`)"))
}
?
)
;
builder = builder.set_block_public_acls(var_96);
}
,
s if s.matches("IgnorePublicAcls") /* IgnorePublicAcls com.amazonaws.s3control#PublicAccessBlockConfiguration$IgnorePublicAcls */ => {
let var_97 =
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.s3control#Setting`)"))
}
?
)
;
builder = builder.set_ignore_public_acls(var_97);
}
,
s if s.matches("BlockPublicPolicy") /* BlockPublicPolicy com.amazonaws.s3control#PublicAccessBlockConfiguration$BlockPublicPolicy */ => {
let var_98 =
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.s3control#Setting`)"))
}
?
)
;
builder = builder.set_block_public_policy(var_98);
}
,
s if s.matches("RestrictPublicBuckets") /* RestrictPublicBuckets com.amazonaws.s3control#PublicAccessBlockConfiguration$RestrictPublicBuckets */ => {
let var_99 =
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.s3control#Setting`)"))
}
?
)
;
builder = builder.set_restrict_public_buckets(var_99);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for PublicAccessBlockConfiguration
impl Clone for PublicAccessBlockConfiguration
source§fn clone(&self) -> PublicAccessBlockConfiguration
fn clone(&self) -> PublicAccessBlockConfiguration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more