Disk
This class encapsulates and extends the ROS resource type ALIYUN::ECS::Disk, which is used to create a cloud disk in Elastic Compute Service (ECS).
Initializers
import com.aliyun.ros.cdk.ecs.Disk;
Disk.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
// .autoSnapshotPolicyId(java.lang.String)
// .autoSnapshotPolicyId(IResolvable)
// .burstingEnabled(java.lang.Boolean)
// .burstingEnabled(IResolvable)
// .deleteAutoSnapshot(java.lang.Boolean)
// .deleteAutoSnapshot(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .diskCategory(java.lang.String)
// .diskCategory(IResolvable)
// .diskName(java.lang.String)
// .diskName(IResolvable)
// .encrypted(java.lang.Boolean)
// .encrypted(IResolvable)
// .instanceId(java.lang.String)
// .instanceId(IResolvable)
// .kmsKeyId(java.lang.String)
// .kmsKeyId(IResolvable)
// .multiAttach(java.lang.String)
// .multiAttach(IResolvable)
// .performanceLevel(java.lang.String)
// .performanceLevel(IResolvable)
// .provisionedIops(java.lang.Number)
// .provisionedIops(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .size(java.lang.Number)
// .size(IResolvable)
// .snapshotId(java.lang.String)
// .snapshotId(IResolvable)
// .storageSetId(java.lang.String)
// .storageSetId(IResolvable)
// .storageSetPartitionNumber(java.lang.Number)
// .storageSetPartitionNumber(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .zoneId(java.lang.String)
// .zoneId(IResolvable)
.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. |
autoSnapshotPolicyId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property autoSnapshotPolicyId: Auto snapshot policy ID. |
burstingEnabled |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property burstingEnabled: Whether enable bursting. |
deleteAutoSnapshot |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property deleteAutoSnapshot: Whether the auto snapshot is released with the disk. |
description |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property description: Description of the disk, [2, 256] characters. |
diskCategory |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property diskCategory: The disk category, now support cloud\/cloud_ssd\/cloud_essd\/cloud_efficiency\/san_ssd\/san_efficiency\/cloud_auto, depends the region. |
diskName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property diskName: Display name of the disk, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'. |
encrypted |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property encrypted: Whether disk is encrypted, default to false. |
instanceId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property instanceId: Create a cloud disk and automatically mount it to the specified InstanceId. |
kmsKeyId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property kmsKeyId: KMS key ID used by the cloud disk. |
multiAttach |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property multiAttach: Specifies whether to enable the multi-attach feature for the disk. |
performanceLevel |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property performanceLevel: The performance level you select for an ESSD.Default value: PL1. Valid values:PL0: A single enhanced SSD delivers up to 10,000 random read\/write IOPS.PL1: A single enhanced SSD delivers up to 50,000 random read\/write IOPS.PL2: A single enhanced SSD delivers up to 100,000 random read\/write IOPS.PL3: A single enhanced SSD delivers up to 1,000,000 random read\/write IOPS. |
provisionedIops |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property provisionedIops: Provisioning IOPS. |
resourceGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property resourceGroupId: Resource group id. |
size |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property size: The size of the disk unit in GB. |
snapshotId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property snapshotId: If specified, the backup used as the source to create disk. |
storageSetId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property storageSetId: Storage set ID. |
storageSetPartitionNumber |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property storageSetPartitionNumber: The number of storage set partitions. |
tags |
java.util.List<TagsProperty> |
Property tags: Tags to attach to disk. |
zoneId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property zoneId: Create a pay-as-you-go cloud drive within the specified availability area. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
autoSnapshotPolicyIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property autoSnapshotPolicyId: Auto snapshot policy ID.
burstingEnabledOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property burstingEnabled: Whether enable bursting.
deleteAutoSnapshotOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property deleteAutoSnapshot: Whether the auto snapshot is released with the disk.
Default to false.
descriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: Description of the disk, [2, 256] characters.
Do not fill or empty, the default is empty.
diskCategoryOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property diskCategory: The disk category, now support cloud\/cloud_ssd\/cloud_essd\/cloud_efficiency\/san_ssd\/san_efficiency\/cloud_auto, depends the region.
diskNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property diskName: Display name of the disk, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'.
encryptedOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property encrypted: Whether disk is encrypted, default to false.
instanceIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceId: Create a cloud disk and automatically mount it to the specified InstanceId.
- Once the instance ID is set, the ResourceGroupId, Tags, and KMSKeyId parameters you set are ignored.
- You cannot specify both ZoneId and InstanceId. Default value: null, meaning that a pay-as-you-go cloud drive is created, and the region of the drive is defined by the RegionId and ZoneId.
kmsKeyIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property kmsKeyId: KMS key ID used by the cloud disk.
multiAttachOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property multiAttach: Specifies whether to enable the multi-attach feature for the disk.
Valid values: Disabled: disables the multi-attach feature. Enabled: enables the multi-attach feature. Set the value to Enabled only for ESSDs. Default value: Disabled.
performanceLevelOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property performanceLevel: The performance level you select for an ESSD.Default value: PL1. Valid values:PL0: A single enhanced SSD delivers up to 10,000 random read\/write IOPS.PL1: A single enhanced SSD delivers up to 50,000 random read\/write IOPS.PL2: A single enhanced SSD delivers up to 100,000 random read\/write IOPS.PL3: A single enhanced SSD delivers up to 1,000,000 random read\/write IOPS.
provisionedIopsOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property provisionedIops: Provisioning IOPS.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
sizeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property size: The size of the disk unit in GB.
snapshotIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property snapshotId: If specified, the backup used as the source to create disk.
storageSetIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property storageSetId: Storage set ID.
storageSetPartitionNumberOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property storageSetPartitionNumber: The number of storage set partitions.
tagsOptional
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to disk.
Max support 20 tags to add during create disk. Each tag with two properties Key and Value, and Key is required.
zoneIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property zoneId: Create a pay-as-you-go cloud drive within the specified availability area.
- If you do not set InstanceId, ZoneId is required.
- You cannot specify both ZoneId and InstanceId.
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. |
isConstruct
import com.aliyun.ros.cdk.ecs.Disk;
Disk.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
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. |
attrDiskId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute DiskId: Id of created disk. |
attrStatus |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Status: Created disk status. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrDiskIdRequired
public IResolvable getAttrDiskId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute DiskId: Id of created disk.
attrStatusRequired
public IResolvable getAttrStatus();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Status: Created disk status.