CfnBucketPropsMixin
- class aws_cdk.mixins_preview.aws_lightsail.mixins.CfnBucketPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::Lightsail::Bucketresource specifies a bucket.- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-bucket.html
- CloudformationResource:
AWS::Lightsail::Bucket
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_lightsail import mixins as lightsail_mixins cfn_bucket_props_mixin = lightsail_mixins.CfnBucketPropsMixin(lightsail_mixins.CfnBucketMixinProps( access_rules=lightsail_mixins.CfnBucketPropsMixin.AccessRulesProperty( allow_public_overrides=False, object_access="objectAccess" ), bucket_name="bucketName", bundle_id="bundleId", object_versioning=False, read_only_access_accounts=["readOnlyAccessAccounts"], resources_receiving_access=["resourcesReceivingAccess"], tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Lightsail::Bucket.- Parameters:
props (
Union[CfnBucketMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['accessRules', 'bucketName', 'bundleId', 'objectVersioning', 'readOnlyAccessAccounts', 'resourcesReceivingAccess', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AccessRulesProperty
- class CfnBucketPropsMixin.AccessRulesProperty(*, allow_public_overrides=None, object_access=None)
Bases:
objectAccessRulesis a property of the AWS::Lightsail::Bucket resource. It describes access rules for a bucket.- Parameters:
allow_public_overrides (
Union[bool,IResolvable,None]) – A Boolean value indicating whether the access control list (ACL) permissions that are applied to individual objects override theGetObjectoption 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-readACL or theprivateACL.object_access (
Optional[str]) – 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 theGetObjectvalue is set topublic, then all objects in the bucket default to public regardless of theallowPublicOverridesvalue. -private- Sets all objects in the bucket to private, making them readable only by you and anyone that you grant access to. If theGetObjectvalue is set toprivate, and theallowPublicOverridesvalue is set totrue, then all objects in the bucket default to private unless they are configured with apublic-readACL. Individual objects with apublic-readACL are readable by everyone on the internet.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_lightsail import mixins as lightsail_mixins access_rules_property = lightsail_mixins.CfnBucketPropsMixin.AccessRulesProperty( allow_public_overrides=False, object_access="objectAccess" )
Attributes
- allow_public_overrides
A Boolean value indicating whether the access control list (ACL) permissions that are applied to individual objects override the
GetObjectoption 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 the
public-readACL or theprivateACL.
- object_access
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
GetObjectvalue is set topublic, then all objects in the bucket default to public regardless of theallowPublicOverridesvalue.private- Sets all objects in the bucket to private, making them readable only by you and anyone that you grant access to.
If the
GetObjectvalue is set toprivate, and theallowPublicOverridesvalue is set totrue, then all objects in the bucket default to private unless they are configured with apublic-readACL. Individual objects with apublic-readACL are readable by everyone on the internet.