Bucket
This class encapsulates and extends the ROS resource type ALIYUN::OSS::Bucket
, which is used to create a bucket in Object Storage Service (OSS).
Initializers
import com.aliyun.ros.cdk.oss.Bucket;
Bucket.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.bucketName(java.lang.String)
.bucketName(IResolvable)
// .accessControl(java.lang.String)
// .accessControl(IResolvable)
// .corsConfiguration(IResolvable)
// .corsConfiguration(CORSConfigurationProperty)
// .deletionForce(java.lang.Boolean)
// .deletionForce(IResolvable)
// .enableOssHdfsService(java.lang.Boolean)
// .enableOssHdfsService(IResolvable)
// .lifecycleConfiguration(IResolvable)
// .lifecycleConfiguration(LifecycleConfigurationProperty)
// .loggingConfiguration(IResolvable)
// .loggingConfiguration(LoggingConfigurationProperty)
// .policy(IResolvable)
// .policy(java.util.Map<java.lang.String, java.lang.Object>)
// .redundancyType(java.lang.String)
// .redundancyType(IResolvable)
// .refererConfiguration(IResolvable)
// .refererConfiguration(RefererConfigurationProperty)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .serverSideEncryptionConfiguration(IResolvable)
// .serverSideEncryptionConfiguration(ServerSideEncryptionConfigurationProperty)
// .storageClass(java.lang.String)
// .storageClass(IResolvable)
// .tags(java.util.Map<java.lang.String, java.lang.Object>)
// .versioningConfiguration(IResolvable)
// .versioningConfiguration(VersioningConfigurationProperty)
// .websiteConfigurationV2(IResolvable)
// .websiteConfigurationV2(WebsiteConfigurationV2Property)
.build();
Name | Type | Description |
---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
bucketName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property bucketName: bucket name. |
accessControl |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property accessControl: The access control list. |
corsConfiguration |
com.aliyun.ros.cdk.core.IResolvable OR CORSConfigurationProperty |
Property corsConfiguration: Rules that define cross-origin resource sharing of objects in this bucket. |
deletionForce |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property deletionForce: Whether force delete the relative objects in the bucket. |
enableOssHdfsService |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property enableOssHdfsService: Whether enable OSS-HDFS service. |
lifecycleConfiguration |
com.aliyun.ros.cdk.core.IResolvable OR LifecycleConfigurationProperty |
Property lifecycleConfiguration: Rules that define how oss bucket manages objects during their lifetime. |
loggingConfiguration |
com.aliyun.ros.cdk.core.IResolvable OR LoggingConfigurationProperty |
Property loggingConfiguration: Settings that defines where logs are stored. |
policy |
com.aliyun.ros.cdk.core.IResolvable OR java.util.Map |
Property policy: Bucket policy. |
redundancyType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property redundancyType: Specifies the data disaster recovery type of the storage space. |
refererConfiguration |
com.aliyun.ros.cdk.core.IResolvable OR RefererConfigurationProperty |
Property refererConfiguration: undefined. |
resourceGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property resourceGroupId: The resource group id. |
serverSideEncryptionConfiguration |
com.aliyun.ros.cdk.core.IResolvable OR ServerSideEncryptionConfigurationProperty |
Property serverSideEncryptionConfiguration: Specifies the bucket used to store the server-side encryption rule. |
storageClass |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property storageClass: Specifies the storage class of the bucket. |
tags |
java.util.Map |
Property tags: Bucket tags in k-v pairs format. |
versioningConfiguration |
com.aliyun.ros.cdk.core.IResolvable OR VersioningConfigurationProperty |
Property versioningConfiguration: A state of versioning. |
websiteConfigurationV2 |
com.aliyun.ros.cdk.core.IResolvable OR WebsiteConfigurationV2Property |
Property websiteConfigurationV2: Website configuration. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
bucketName
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property bucketName: bucket name.
accessControl
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property accessControl: The access control list.
corsConfiguration
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR CORSConfigurationProperty
Property corsConfiguration: Rules that define cross-origin resource sharing of objects in this bucket.
deletionForce
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property deletionForce: Whether force delete the relative objects in the bucket.
Default value is false.
enableOssHdfsService
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property enableOssHdfsService: Whether enable OSS-HDFS service.
Note: Once it's enabled, it can't be disabled again.
lifecycleConfiguration
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR LifecycleConfigurationProperty
Property lifecycleConfiguration: Rules that define how oss bucket manages objects during their lifetime.
loggingConfiguration
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR LoggingConfigurationProperty
Property loggingConfiguration: Settings that defines where logs are stored.
policy
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property policy: Bucket policy.
redundancyType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property redundancyType: Specifies the data disaster recovery type of the storage space.
The value range is as follows: LRS (default): Local redundant LRS stores your data redundantly on different storage devices in the same availability zone, and can support data loss and normal access even when two storage devices are damaged concurrently. ZRS: Intra-city redundant ZRS adopts a data redundancy storage mechanism in multiple availability zones (AZ), and stores user data redundantly in multiple availability zones in the same region. When an availability zone is unavailable, normal access to data can still be guaranteed.
refererConfiguration
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR RefererConfigurationProperty
Property refererConfiguration: undefined.
resourceGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The resource group id.
serverSideEncryptionConfiguration
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR ServerSideEncryptionConfigurationProperty
Property serverSideEncryptionConfiguration: Specifies the bucket used to store the server-side encryption rule.
storageClass
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property storageClass: Specifies the storage class of the bucket.
Default is "Standard".
tags
Optional
- Type: java.util.Map
Property tags: Bucket tags in k-v pairs format.
versioningConfiguration
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR VersioningConfigurationProperty
Property versioningConfiguration: A state of versioning.
websiteConfigurationV2
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR WebsiteConfigurationV2Property
Property websiteConfigurationV2: Website configuration.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
validateBucketName |
Thrown an exception if the given bucket name is not valid. |
isConstruct
import com.aliyun.ros.cdk.oss.Bucket;
Bucket.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
validateBucketName
import com.aliyun.ros.cdk.oss.Bucket;
Bucket.validateBucketName(java.lang.String physicalName)
Thrown an exception if the given bucket name is not valid.
- Type: java.lang.String
name of the bucket.
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrDomainName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute DomainName: The public DNS name of the specified bucket. |
attrInternalDomainName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute InternalDomainName: The internal DNS name of the specified bucket. |
attrName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Name: The name of Bucket. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrDomainName
Required
public IResolvable getAttrDomainName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute DomainName: The public DNS name of the specified bucket.
attrInternalDomainName
Required
public IResolvable getAttrInternalDomainName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute InternalDomainName: The internal DNS name of the specified bucket.
attrName
Required
public IResolvable getAttrName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Name: The name of Bucket.