Snapshot
This class encapsulates and extends the ROS resource type ALIYUN::ECS::Snapshot
, which is used to create a snapshot for a disk.
Initializers
import com.aliyun.ros.cdk.ecs.Snapshot;
Snapshot.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.diskId(java.lang.String)
.diskId(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .instantAccess(java.lang.Boolean)
// .instantAccess(IResolvable)
// .instantAccessRetentionDays(java.lang.Number)
// .instantAccessRetentionDays(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .retentionDays(java.lang.Number)
// .retentionDays(IResolvable)
// .snapshotName(java.lang.String)
// .snapshotName(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .timeout(java.lang.Number)
// .timeout(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. |
diskId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property diskId: Indicates the ID of the specified disk. |
description |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property description: The description of a snapshot can be 2 to 256 characters in length and cannot begin with http:\/\/ or https:\/\/. |
instantAccess |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property instantAccess: Specifies whether to enable the instant access feature. |
instantAccessRetentionDays |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property instantAccessRetentionDays: Specifies the retention period of the instant access feature. |
resourceGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property resourceGroupId: Resource group id. |
retentionDays |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property retentionDays: Set the retention period of a snapshot in days. |
snapshotName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property snapshotName: The name of the snapshot, [2, 128] English or Chinese characters. |
tags |
java.util.List<TagsProperty> |
Property tags: Tags to attach to instance. |
timeout |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property timeout: The number of minutes to wait for create snapshot. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
diskId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property diskId: Indicates the ID of the specified disk.
description
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of a snapshot can be 2 to 256 characters in length and cannot begin with http:\/\/ or https:\/\/.
The description will appear on the console. By default, the value is zero.
instantAccess
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property instantAccess: Specifies whether to enable the instant access feature.
Valid values: true: enables the instant access feature. This feature can be enabled only for enhanced SSDs (ESSDs) false: disables the instant access feature. If InstantAccess is set to false, normal snapshots are created. Default value: false. Note This parameter and the Category parameter cannot be specified at the same time. For more information, see the "Description" section in this topic.
instantAccessRetentionDays
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property instantAccessRetentionDays: Specifies the retention period of the instant access feature.
After the retention period ends, the snapshot is automatically released. This parameter takes effect only when InstantAccess is set to true. Unit: days. Valid values: 1 to 65535. By default, the value of this parameter is the same as that of RetentionDays.
resourceGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
retentionDays
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property retentionDays: Set the retention period of a snapshot in days.
The snapshot will be automatically released after the retention period expires. The value ranges from 1 to 65536.
snapshotName
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property snapshotName: The name of the snapshot, [2, 128] English or Chinese characters.
It must begin with an uppercase/lowercase letter or a Chinese character, and may contain numbers, '_' or '-'. It cannot begin with http:// or https://.
tags
Optional
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to instance.
Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.
timeout
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property timeout: The number of minutes to wait for create snapshot.
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.Snapshot;
Snapshot.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. |
attrSnapshotId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SnapshotId: The snapshot ID. |
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
attrSnapshotId
Required
public IResolvable getAttrSnapshotId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute SnapshotId: The snapshot ID.