Skip to content

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.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

categoryOptional

  • 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.


diskIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property diskId: The ID of the disk.


encryptedOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property encrypted: Specifies whether the snapshot is encrypted.

Default value: false.


filtersOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property filters: Filter value when querying resources.


instanceIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property instanceId: The ID of the instance.


kmsKeyIdOptional

  • 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.


refreshOptionsOptional

  • 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.

resourceGroupIdOptional

  • 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.


snapshotIdsOptional

  • 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 (,).


snapshotLinkIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property snapshotLinkId: The ID of the snapshot chain.


snapshotNameOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property snapshotName: The name of the snapshot.


snapshotTypeOptional

  • 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


sourceDiskTypeOptional

  • 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.


statusOptional

  • 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.


tagsOptional

  • Type: java.util.List

Property tags: Tags of snapshot.


usageOptional

  • 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.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • 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.

xRequired

  • 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.

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

attrSnapshotIdsRequired

public IResolvable getAttrSnapshotIds();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute SnapshotIds: the list of snapshot ids.


attrSnapshotsRequired

public IResolvable getAttrSnapshots();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute Snapshots: the list of snapshots.