Snapshots
This class encapsulates and extends the ROS resource type DATASOURCE::ECS::Snapshots
, which is used to query all snapshots of an Elastic Compute Service (ECS) instance or a disk.
Initializers
import com.aliyun.ros.cdk.ecs.datasource.Snapshots;
Snapshots.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
// .category(java.lang.String)
// .category(IResolvable)
// .diskId(java.lang.String)
// .diskId(IResolvable)
// .encrypted(java.lang.Boolean)
// .encrypted(IResolvable)
// .filters(IResolvable)
// .filters(java.util.List<FiltersProperty)
// .filters(IResolvable>)
// .instanceId(java.lang.String)
// .instanceId(IResolvable)
// .kmsKeyId(java.lang.String)
// .kmsKeyId(IResolvable)
// .refreshOptions(java.lang.String)
// .refreshOptions(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .snapshotIds(IResolvable)
// .snapshotIds(java.util.List<java.lang.String)
// .snapshotIds(IResolvable>)
// .snapshotLinkId(java.lang.String)
// .snapshotLinkId(IResolvable)
// .snapshotName(java.lang.String)
// .snapshotName(IResolvable)
// .snapshotType(java.lang.String)
// .snapshotType(IResolvable)
// .sourceDiskType(java.lang.String)
// .sourceDiskType(IResolvable)
// .status(java.lang.String)
// .status(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .usage(java.lang.String)
// .usage(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. |
category |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property category: The category of the snapshot. |
diskId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property diskId: The ID of the disk. |
encrypted |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property encrypted: Specifies whether the snapshot is encrypted. |
filters |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property filters: Filter value when querying resources. |
instanceId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property instanceId: The ID of the instance. |
kmsKeyId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property kmsKeyId: The ID of the Key Management Service (KMS) key used by the data disk. |
refreshOptions |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated. |
resourceGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property resourceGroupId: The ID of the resource group to which the snapshot belongs. |
snapshotIds |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property snapshotIds: The IDs of snapshots. |
snapshotLinkId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property snapshotLinkId: The ID of the snapshot chain. |
snapshotName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property snapshotName: The name of the snapshot. |
snapshotType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property snapshotType: Specifies whether the snapshot has been used to create images or disks. |
sourceDiskType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property sourceDiskType: The type of the source disk for which the snapshot was created. |
status |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property status: The status of the snapshot. |
tags |
java.util.List |
Property tags: Tags of snapshot. |
usage |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property usage: The type of the snapshot. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
category
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property category: The category of the snapshot.
Valid values: Standard: normal snapshot Flash: local snapshot The local snapshot feature is replaced by the instant access feature. When you specify this parameter, take note of the following items: If you have used local snapshots before December 14, 2020, you can use this parameter. If you have not used local snapshots before December 14, 2020, you cannot use this parameter. Note This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility.
diskId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property diskId: The ID of the disk.
encrypted
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property encrypted: Specifies whether the snapshot is encrypted.
Default value: false.
filters
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property filters: Filter value when querying resources.
instanceId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceId: The ID of the instance.
kmsKeyId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property kmsKeyId: The ID of the Key Management Service (KMS) key used by the data disk.
refreshOptions
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
Valid values:
- Never: Never refresh the datasource resource when the stack is updated.
- Always: Always refresh the datasource resource when the stack is updated. Default is Never.
resourceGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The ID of the resource group to which the snapshot belongs.
If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
snapshotIds
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property snapshotIds: The IDs of snapshots.
The value can be a JSON array that consists of up to 100 snapshot IDs. Separate multiple snapshot IDs with commas (,).
snapshotLinkId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property snapshotLinkId: The ID of the snapshot chain.
snapshotName
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property snapshotName: The name of the snapshot.
snapshotType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property snapshotType: Specifies whether the snapshot has been used to create images or disks.
Valid values: auto: automatic snapshot user: manual snapshot all: all snapshot types
sourceDiskType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sourceDiskType: The type of the source disk for which the snapshot was created.
Valid values: System: system disk Data: data disk Note These values are case-insensitive.
status
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property status: The status of the snapshot.
Default value: all. Valid values: progressing: The snapshot is being created. accomplished: The snapshot is created. failed: The snapshot fails to be created. all: all snapshot statuses.
tags
Optional
- Type: java.util.List
Property tags: Tags of snapshot.
usage
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property usage: The type of the snapshot.
Default value: all. Valid values: image: The snapshot has been used to create custom images. disk: The snapshot has been used to create disks. image_disk: The snapshot has been used to create custom images and data disks. none: The snapshot has not been used to create custom images or disks.
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.datasource.Snapshots;
Snapshots.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. |
attrSnapshotIds |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SnapshotIds: the list of snapshot ids. |
attrSnapshots |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Snapshots: the list of snapshots. |
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
attrSnapshotIds
Required
public IResolvable getAttrSnapshotIds();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute SnapshotIds: the list of snapshot ids.
attrSnapshots
Required
public IResolvable getAttrSnapshots();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Snapshots: the list of snapshots.