/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include The This data
* type is not supported for Amazon S3 on Outposts.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.See Also:
AWS
* API Reference
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:
PutBucketAcl
and
* PutObjectAcl
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 property is not supported for Amazon S3 on Outposts.
*/ inline bool GetBlockPublicAcls() const{ return m_blockPublicAcls; } /** *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:
PutBucketAcl
and
* PutObjectAcl
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 property is not supported for Amazon S3 on Outposts.
*/ inline bool BlockPublicAclsHasBeenSet() const { return m_blockPublicAclsHasBeenSet; } /** *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:
PutBucketAcl
and
* PutObjectAcl
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 property is not supported for Amazon S3 on Outposts.
*/ inline void SetBlockPublicAcls(bool value) { m_blockPublicAclsHasBeenSet = true; m_blockPublicAcls = value; } /** *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:
PutBucketAcl
and
* PutObjectAcl
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 property is not supported for Amazon S3 on Outposts.
*/ inline PublicAccessBlockConfiguration& WithBlockPublicAcls(bool value) { SetBlockPublicAcls(value); return *this;} /** *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 property is * not supported for Amazon S3 on Outposts.
*/ inline bool GetIgnorePublicAcls() const{ return m_ignorePublicAcls; } /** *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 property is * not supported for Amazon S3 on Outposts.
*/ inline bool IgnorePublicAclsHasBeenSet() const { return m_ignorePublicAclsHasBeenSet; } /** *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 property is * not supported for Amazon S3 on Outposts.
*/ inline void SetIgnorePublicAcls(bool value) { m_ignorePublicAclsHasBeenSet = true; m_ignorePublicAcls = value; } /** *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 property is * not supported for Amazon S3 on Outposts.
*/ inline PublicAccessBlockConfiguration& WithIgnorePublicAcls(bool value) { SetIgnorePublicAcls(value); return *this;} /** *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 property is not supported for Amazon S3 on Outposts.
*/ inline bool GetBlockPublicPolicy() const{ return m_blockPublicPolicy; } /** *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 property is not supported for Amazon S3 on Outposts.
*/ inline bool BlockPublicPolicyHasBeenSet() const { return m_blockPublicPolicyHasBeenSet; } /** *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 property is not supported for Amazon S3 on Outposts.
*/ inline void SetBlockPublicPolicy(bool value) { m_blockPublicPolicyHasBeenSet = true; m_blockPublicPolicy = value; } /** *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 property is not supported for Amazon S3 on Outposts.
*/ inline PublicAccessBlockConfiguration& WithBlockPublicPolicy(bool value) { SetBlockPublicPolicy(value); return *this;} /** *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 property is not supported for Amazon * S3 on Outposts.
*/ inline bool GetRestrictPublicBuckets() const{ return m_restrictPublicBuckets; } /** *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 property is not supported for Amazon * S3 on Outposts.
*/ inline bool RestrictPublicBucketsHasBeenSet() const { return m_restrictPublicBucketsHasBeenSet; } /** *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 property is not supported for Amazon * S3 on Outposts.
*/ inline void SetRestrictPublicBuckets(bool value) { m_restrictPublicBucketsHasBeenSet = true; m_restrictPublicBuckets = value; } /** *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 property is not supported for Amazon * S3 on Outposts.
*/ inline PublicAccessBlockConfiguration& WithRestrictPublicBuckets(bool value) { SetRestrictPublicBuckets(value); return *this;} private: bool m_blockPublicAcls; bool m_blockPublicAclsHasBeenSet = false; bool m_ignorePublicAcls; bool m_ignorePublicAclsHasBeenSet = false; bool m_blockPublicPolicy; bool m_blockPublicPolicyHasBeenSet = false; bool m_restrictPublicBuckets; bool m_restrictPublicBucketsHasBeenSet = false; }; } // namespace Model } // namespace S3Control } // namespace Aws