Class CfnBucket.AccessRulesProperty.Builder
java.lang.Object
software.amazon.awscdk.services.lightsail.CfnBucket.AccessRulesProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucket.AccessRulesProperty>
- Enclosing interface:
CfnBucket.AccessRulesProperty
@Stability(Stable)
public static final class CfnBucket.AccessRulesProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucket.AccessRulesProperty>
A builder for
CfnBucket.AccessRulesProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallowPublicOverrides
(Boolean allowPublicOverrides) Sets the value ofCfnBucket.AccessRulesProperty.getAllowPublicOverrides()
allowPublicOverrides
(IResolvable allowPublicOverrides) Sets the value ofCfnBucket.AccessRulesProperty.getAllowPublicOverrides()
build()
Builds the configured instance.objectAccess
(String objectAccess) Sets the value ofCfnBucket.AccessRulesProperty.getObjectAccess()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowPublicOverrides
@Stability(Stable) public CfnBucket.AccessRulesProperty.Builder allowPublicOverrides(Boolean allowPublicOverrides) Sets the value ofCfnBucket.AccessRulesProperty.getAllowPublicOverrides()
- Parameters:
allowPublicOverrides
- A Boolean value indicating whether the access control list (ACL) permissions that are applied to individual objects override theGetObject
option that is currently specified. When this is true, you can use the PutObjectAcl Amazon S3 API operation to set individual objects to public (read-only) or private, using either thepublic-read
ACL or theprivate
ACL.- Returns:
this
-
allowPublicOverrides
@Stability(Stable) public CfnBucket.AccessRulesProperty.Builder allowPublicOverrides(IResolvable allowPublicOverrides) Sets the value ofCfnBucket.AccessRulesProperty.getAllowPublicOverrides()
- Parameters:
allowPublicOverrides
- A Boolean value indicating whether the access control list (ACL) permissions that are applied to individual objects override theGetObject
option that is currently specified. When this is true, you can use the PutObjectAcl Amazon S3 API operation to set individual objects to public (read-only) or private, using either thepublic-read
ACL or theprivate
ACL.- Returns:
this
-
objectAccess
Sets the value ofCfnBucket.AccessRulesProperty.getObjectAccess()
- Parameters:
objectAccess
- Specifies the anonymous access to all objects in a bucket. The following options can be specified:public
- Sets all objects in the bucket to public (read-only), making them readable by everyone on the internet.
If the
GetObject
value is set topublic
, then all objects in the bucket default to public regardless of theallowPublicOverrides
value.private
- Sets all objects in the bucket to private, making them readable only by you and anyone that you grant access to.
If the
GetObject
value is set toprivate
, and theallowPublicOverrides
value is set totrue
, then all objects in the bucket default to private unless they are configured with apublic-read
ACL. Individual objects with apublic-read
ACL are readable by everyone on the internet.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnBucket.AccessRulesProperty>
- Returns:
- a new instance of
CfnBucket.AccessRulesProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-