Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides the Ecs Snapshots of the current Alibaba Cloud user.
NOTE: Available since v1.120.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.resourcemanager.getResourceGroups({
status: "OK",
});
const defaultGetZones = alicloud.getZones({
availableDiskCategory: "cloud_essd",
availableResourceCreation: "VSwitch",
});
const defaultGetImages = alicloud.ecs.getImages({
mostRecent: true,
owners: "system",
});
const defaultGetInstanceTypes = Promise.all([defaultGetZones, defaultGetImages]).then(([defaultGetZones, defaultGetImages]) => alicloud.ecs.getInstanceTypes({
availabilityZone: defaultGetZones.zones?.[0]?.id,
imageId: defaultGetImages.images?.[0]?.id,
systemDiskCategory: "cloud_essd",
}));
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "192.168.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: name,
vpcId: defaultNetwork.id,
cidrBlock: "192.168.192.0/24",
zoneId: defaultGetZones.then(defaultGetZones => defaultGetZones.zones?.[0]?.id),
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
name: name,
vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.ecs.Instance("default", {
imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
securityGroups: [defaultSecurityGroup].map(__item => __item.id),
internetChargeType: "PayByTraffic",
internetMaxBandwidthOut: 10,
availabilityZone: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.availabilityZones?.[0]),
instanceChargeType: "PostPaid",
systemDiskCategory: "cloud_essd",
vswitchId: defaultSwitch.id,
instanceName: name,
dataDisks: [{
category: "cloud_essd",
size: 20,
}],
});
const defaultEcsDisk = new alicloud.ecs.EcsDisk("default", {
diskName: name,
zoneId: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.availabilityZones?.[0]),
category: "cloud_essd",
size: 500,
});
const defaultEcsDiskAttachment = new alicloud.ecs.EcsDiskAttachment("default", {
diskId: defaultEcsDisk.id,
instanceId: defaultInstance.id,
});
const defaultEcsSnapshot = new alicloud.ecs.EcsSnapshot("default", {
diskId: defaultEcsDiskAttachment.diskId,
category: "standard",
retentionDays: 20,
snapshotName: name,
description: name,
tags: {
Created: "TF",
For: "Snapshot",
},
});
const ids = alicloud.ecs.getEcsSnapshotsOutput({
ids: [defaultEcsSnapshot.id],
});
export const ecsSnapshotsId0 = ids.apply(ids => ids.snapshots?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.resourcemanager.get_resource_groups(status="OK")
default_get_zones = alicloud.get_zones(available_disk_category="cloud_essd",
available_resource_creation="VSwitch")
default_get_images = alicloud.ecs.get_images(most_recent=True,
owners="system")
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default_get_zones.zones[0].id,
image_id=default_get_images.images[0].id,
system_disk_category="cloud_essd")
default_network = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="192.168.0.0/16")
default_switch = alicloud.vpc.Switch("default",
vswitch_name=name,
vpc_id=default_network.id,
cidr_block="192.168.192.0/24",
zone_id=default_get_zones.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("default",
name=name,
vpc_id=default_network.id)
default_instance = alicloud.ecs.Instance("default",
image_id=default_get_images.images[0].id,
instance_type=default_get_instance_types.instance_types[0].id,
security_groups=[__item.id for __item in [default_security_group]],
internet_charge_type="PayByTraffic",
internet_max_bandwidth_out=10,
availability_zone=default_get_instance_types.instance_types[0].availability_zones[0],
instance_charge_type="PostPaid",
system_disk_category="cloud_essd",
vswitch_id=default_switch.id,
instance_name=name,
data_disks=[{
"category": "cloud_essd",
"size": 20,
}])
default_ecs_disk = alicloud.ecs.EcsDisk("default",
disk_name=name,
zone_id=default_get_instance_types.instance_types[0].availability_zones[0],
category="cloud_essd",
size=500)
default_ecs_disk_attachment = alicloud.ecs.EcsDiskAttachment("default",
disk_id=default_ecs_disk.id,
instance_id=default_instance.id)
default_ecs_snapshot = alicloud.ecs.EcsSnapshot("default",
disk_id=default_ecs_disk_attachment.disk_id,
category="standard",
retention_days=20,
snapshot_name=name,
description=name,
tags={
"Created": "TF",
"For": "Snapshot",
})
ids = alicloud.ecs.get_ecs_snapshots_output(ids=[default_ecs_snapshot.id])
pulumi.export("ecsSnapshotsId0", ids.snapshots[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example";
if param := cfg.Get("name"); param != ""{
name = param
}
_, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{
Status: pulumi.StringRef("OK"),
}, nil);
if err != nil {
return err
}
defaultGetZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableDiskCategory: pulumi.StringRef("cloud_essd"),
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil);
if err != nil {
return err
}
defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
MostRecent: pulumi.BoolRef(true),
Owners: pulumi.StringRef("system"),
}, nil);
if err != nil {
return err
}
defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
AvailabilityZone: pulumi.StringRef(defaultGetZones.Zones[0].Id),
ImageId: pulumi.StringRef(defaultGetImages.Images[0].Id),
SystemDiskCategory: pulumi.StringRef("cloud_essd"),
}, nil);
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
VpcId: defaultNetwork.ID(),
CidrBlock: pulumi.String("192.168.192.0/24"),
ZoneId: pulumi.String(defaultGetZones.Zones[0].Id),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
Name: pulumi.String(name),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
var splat0 pulumi.StringArray
for _, val0 := range %!v(PANIC=Format method: fatal: An assertion has failed: tok: ) {
splat0 = append(splat0, val0.ID())
}
defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
ImageId: pulumi.String(defaultGetImages.Images[0].Id),
InstanceType: pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
SecurityGroups: splat0,
InternetChargeType: pulumi.String("PayByTraffic"),
InternetMaxBandwidthOut: pulumi.Int(10),
AvailabilityZone: pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].AvailabilityZones[0]),
InstanceChargeType: pulumi.String("PostPaid"),
SystemDiskCategory: pulumi.String("cloud_essd"),
VswitchId: defaultSwitch.ID(),
InstanceName: pulumi.String(name),
DataDisks: ecs.InstanceDataDiskArray{
&ecs.InstanceDataDiskArgs{
Category: pulumi.String("cloud_essd"),
Size: pulumi.Int(20),
},
},
})
if err != nil {
return err
}
defaultEcsDisk, err := ecs.NewEcsDisk(ctx, "default", &ecs.EcsDiskArgs{
DiskName: pulumi.String(name),
ZoneId: pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].AvailabilityZones[0]),
Category: pulumi.String("cloud_essd"),
Size: pulumi.Int(500),
})
if err != nil {
return err
}
defaultEcsDiskAttachment, err := ecs.NewEcsDiskAttachment(ctx, "default", &ecs.EcsDiskAttachmentArgs{
DiskId: defaultEcsDisk.ID(),
InstanceId: defaultInstance.ID(),
})
if err != nil {
return err
}
defaultEcsSnapshot, err := ecs.NewEcsSnapshot(ctx, "default", &ecs.EcsSnapshotArgs{
DiskId: defaultEcsDiskAttachment.DiskId,
Category: pulumi.String("standard"),
RetentionDays: pulumi.Int(20),
SnapshotName: pulumi.String(name),
Description: pulumi.String(name),
Tags: pulumi.StringMap{
"Created": pulumi.String("TF"),
"For": pulumi.String("Snapshot"),
},
})
if err != nil {
return err
}
ids := ecs.GetEcsSnapshotsOutput(ctx, ecs.GetEcsSnapshotsOutputArgs{
Ids: pulumi.StringArray{
defaultEcsSnapshot.ID(),
},
}, nil);
ctx.Export("ecsSnapshotsId0", ids.ApplyT(func(ids ecs.GetEcsSnapshotsResult) (*string, error) {
return &ids.Snapshots[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
{
Status = "OK",
});
var defaultGetZones = AliCloud.GetZones.Invoke(new()
{
AvailableDiskCategory = "cloud_essd",
AvailableResourceCreation = "VSwitch",
});
var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
{
MostRecent = true,
Owners = "system",
});
var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
{
AvailabilityZone = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
SystemDiskCategory = "cloud_essd",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "192.168.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = name,
VpcId = defaultNetwork.Id,
CidrBlock = "192.168.192.0/24",
ZoneId = defaultGetZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = name,
VpcId = defaultNetwork.Id,
});
var defaultInstance = new AliCloud.Ecs.Instance("default", new()
{
ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
SecurityGroups = new[]
{
defaultSecurityGroup,
}.Select(__item => __item.Id).ToList(),
InternetChargeType = "PayByTraffic",
InternetMaxBandwidthOut = 10,
AvailabilityZone = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.AvailabilityZones[0]),
InstanceChargeType = "PostPaid",
SystemDiskCategory = "cloud_essd",
VswitchId = defaultSwitch.Id,
InstanceName = name,
DataDisks = new[]
{
new AliCloud.Ecs.Inputs.InstanceDataDiskArgs
{
Category = "cloud_essd",
Size = 20,
},
},
});
var defaultEcsDisk = new AliCloud.Ecs.EcsDisk("default", new()
{
DiskName = name,
ZoneId = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.AvailabilityZones[0]),
Category = "cloud_essd",
Size = 500,
});
var defaultEcsDiskAttachment = new AliCloud.Ecs.EcsDiskAttachment("default", new()
{
DiskId = defaultEcsDisk.Id,
InstanceId = defaultInstance.Id,
});
var defaultEcsSnapshot = new AliCloud.Ecs.EcsSnapshot("default", new()
{
DiskId = defaultEcsDiskAttachment.DiskId,
Category = "standard",
RetentionDays = 20,
SnapshotName = name,
Description = name,
Tags =
{
{ "Created", "TF" },
{ "For", "Snapshot" },
},
});
var ids = AliCloud.Ecs.GetEcsSnapshots.Invoke(new()
{
Ids = new[]
{
defaultEcsSnapshot.Id,
},
});
return new Dictionary<string, object?>
{
["ecsSnapshotsId0"] = ids.Apply(getEcsSnapshotsResult => getEcsSnapshotsResult.Snapshots[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.ecs.inputs.InstanceDataDiskArgs;
import com.pulumi.alicloud.ecs.EcsDisk;
import com.pulumi.alicloud.ecs.EcsDiskArgs;
import com.pulumi.alicloud.ecs.EcsDiskAttachment;
import com.pulumi.alicloud.ecs.EcsDiskAttachmentArgs;
import com.pulumi.alicloud.ecs.EcsSnapshot;
import com.pulumi.alicloud.ecs.EcsSnapshotArgs;
import com.pulumi.alicloud.ecs.inputs.GetEcsSnapshotsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.status("OK")
.build());
final var defaultGetZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableDiskCategory("cloud_essd")
.availableResourceCreation("VSwitch")
.build());
final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
.mostRecent(true)
.owners("system")
.build());
final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.availabilityZone(defaultGetZones.zones()[0].id())
.imageId(defaultGetImages.images()[0].id())
.systemDiskCategory("cloud_essd")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("192.168.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.vpcId(defaultNetwork.id())
.cidrBlock("192.168.192.0/24")
.zoneId(defaultGetZones.zones()[0].id())
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name(name)
.vpcId(defaultNetwork.id())
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.imageId(defaultGetImages.images()[0].id())
.instanceType(defaultGetInstanceTypes.instanceTypes()[0].id())
.securityGroups(defaultSecurityGroup.stream().map(element -> element.id()).collect(toList()))
.internetChargeType("PayByTraffic")
.internetMaxBandwidthOut(10)
.availabilityZone(defaultGetInstanceTypes.instanceTypes()[0].availabilityZones()[0])
.instanceChargeType("PostPaid")
.systemDiskCategory("cloud_essd")
.vswitchId(defaultSwitch.id())
.instanceName(name)
.dataDisks(InstanceDataDiskArgs.builder()
.category("cloud_essd")
.size(20)
.build())
.build());
var defaultEcsDisk = new EcsDisk("defaultEcsDisk", EcsDiskArgs.builder()
.diskName(name)
.zoneId(defaultGetInstanceTypes.instanceTypes()[0].availabilityZones()[0])
.category("cloud_essd")
.size(500)
.build());
var defaultEcsDiskAttachment = new EcsDiskAttachment("defaultEcsDiskAttachment", EcsDiskAttachmentArgs.builder()
.diskId(defaultEcsDisk.id())
.instanceId(defaultInstance.id())
.build());
var defaultEcsSnapshot = new EcsSnapshot("defaultEcsSnapshot", EcsSnapshotArgs.builder()
.diskId(defaultEcsDiskAttachment.diskId())
.category("standard")
.retentionDays(20)
.snapshotName(name)
.description(name)
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "Snapshot")
))
.build());
final var ids = EcsFunctions.getEcsSnapshots(GetEcsSnapshotsArgs.builder()
.ids(defaultEcsSnapshot.id())
.build());
ctx.export("ecsSnapshotsId0", ids.applyValue(_ids -> _ids.snapshots()[0].id()));
}
}
Example coming soon!
Using getEcsSnapshots
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getEcsSnapshots(args: GetEcsSnapshotsArgs, opts?: InvokeOptions): Promise<GetEcsSnapshotsResult>
function getEcsSnapshotsOutput(args: GetEcsSnapshotsOutputArgs, opts?: InvokeOptions): Output<GetEcsSnapshotsResult>def get_ecs_snapshots(category: Optional[str] = None,
dry_run: Optional[bool] = None,
encrypted: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
kms_key_id: Optional[str] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
resource_group_id: Optional[str] = None,
snapshot_link_id: Optional[str] = None,
snapshot_name: Optional[str] = None,
snapshot_type: Optional[str] = None,
source_disk_type: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
type: Optional[str] = None,
usage: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEcsSnapshotsResult
def get_ecs_snapshots_output(category: Optional[pulumi.Input[str]] = None,
dry_run: Optional[pulumi.Input[bool]] = None,
encrypted: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
kms_key_id: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
snapshot_link_id: Optional[pulumi.Input[str]] = None,
snapshot_name: Optional[pulumi.Input[str]] = None,
snapshot_type: Optional[pulumi.Input[str]] = None,
source_disk_type: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
type: Optional[pulumi.Input[str]] = None,
usage: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEcsSnapshotsResult]func GetEcsSnapshots(ctx *Context, args *GetEcsSnapshotsArgs, opts ...InvokeOption) (*GetEcsSnapshotsResult, error)
func GetEcsSnapshotsOutput(ctx *Context, args *GetEcsSnapshotsOutputArgs, opts ...InvokeOption) GetEcsSnapshotsResultOutput> Note: This function is named GetEcsSnapshots in the Go SDK.
public static class GetEcsSnapshots
{
public static Task<GetEcsSnapshotsResult> InvokeAsync(GetEcsSnapshotsArgs args, InvokeOptions? opts = null)
public static Output<GetEcsSnapshotsResult> Invoke(GetEcsSnapshotsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetEcsSnapshotsResult> getEcsSnapshots(GetEcsSnapshotsArgs args, InvokeOptions options)
public static Output<GetEcsSnapshotsResult> getEcsSnapshots(GetEcsSnapshotsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:ecs/getEcsSnapshots:getEcsSnapshots
arguments:
# arguments dictionaryThe following arguments are supported:
- Category string
- The category of the snapshot. Valid Values:
flashandstandard. - Dry
Run bool - Specifies whether to check the validity of the request without actually making the request.
- Encrypted bool
- Specifies whether the snapshot is encrypted.
- Ids List<string>
- A list of Snapshot IDs.
- Kms
Key stringId - The kms key id.
- Name
Regex string - A regex string to filter results by Snapshot name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Resource
Group stringId - The resource group id.
- Snapshot
Link stringId - The snapshot link id.
- Snapshot
Name string - The name of the snapshot.
- Snapshot
Type string - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - Source
Disk stringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - Status string
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - Dictionary<string, string>
- A mapping of tags to assign to the snapshot.
- Type string
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - Usage string
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- Category string
- The category of the snapshot. Valid Values:
flashandstandard. - Dry
Run bool - Specifies whether to check the validity of the request without actually making the request.
- Encrypted bool
- Specifies whether the snapshot is encrypted.
- Ids []string
- A list of Snapshot IDs.
- Kms
Key stringId - The kms key id.
- Name
Regex string - A regex string to filter results by Snapshot name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Resource
Group stringId - The resource group id.
- Snapshot
Link stringId - The snapshot link id.
- Snapshot
Name string - The name of the snapshot.
- Snapshot
Type string - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - Source
Disk stringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - Status string
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - map[string]string
- A mapping of tags to assign to the snapshot.
- Type string
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - Usage string
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- category String
- The category of the snapshot. Valid Values:
flashandstandard. - dry
Run Boolean - Specifies whether to check the validity of the request without actually making the request.
- encrypted Boolean
- Specifies whether the snapshot is encrypted.
- ids List<String>
- A list of Snapshot IDs.
- kms
Key StringId - The kms key id.
- name
Regex String - A regex string to filter results by Snapshot name.
- output
File String - File name where to save data source results (after running
pulumi preview). - resource
Group StringId - The resource group id.
- snapshot
Link StringId - The snapshot link id.
- snapshot
Name String - The name of the snapshot.
- snapshot
Type String - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - source
Disk StringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - status String
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - Map<String,String>
- A mapping of tags to assign to the snapshot.
- type String
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - usage String
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- category string
- The category of the snapshot. Valid Values:
flashandstandard. - dry
Run boolean - Specifies whether to check the validity of the request without actually making the request.
- encrypted boolean
- Specifies whether the snapshot is encrypted.
- ids string[]
- A list of Snapshot IDs.
- kms
Key stringId - The kms key id.
- name
Regex string - A regex string to filter results by Snapshot name.
- output
File string - File name where to save data source results (after running
pulumi preview). - resource
Group stringId - The resource group id.
- snapshot
Link stringId - The snapshot link id.
- snapshot
Name string - The name of the snapshot.
- snapshot
Type string - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - source
Disk stringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - status string
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - {[key: string]: string}
- A mapping of tags to assign to the snapshot.
- type string
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - usage string
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- category str
- The category of the snapshot. Valid Values:
flashandstandard. - dry_
run bool - Specifies whether to check the validity of the request without actually making the request.
- encrypted bool
- Specifies whether the snapshot is encrypted.
- ids Sequence[str]
- A list of Snapshot IDs.
- kms_
key_ strid - The kms key id.
- name_
regex str - A regex string to filter results by Snapshot name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - resource_
group_ strid - The resource group id.
- snapshot_
link_ strid - The snapshot link id.
- snapshot_
name str - The name of the snapshot.
- snapshot_
type str - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - source_
disk_ strtype - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - status str
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - Mapping[str, str]
- A mapping of tags to assign to the snapshot.
- type str
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - usage str
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- category String
- The category of the snapshot. Valid Values:
flashandstandard. - dry
Run Boolean - Specifies whether to check the validity of the request without actually making the request.
- encrypted Boolean
- Specifies whether the snapshot is encrypted.
- ids List<String>
- A list of Snapshot IDs.
- kms
Key StringId - The kms key id.
- name
Regex String - A regex string to filter results by Snapshot name.
- output
File String - File name where to save data source results (after running
pulumi preview). - resource
Group StringId - The resource group id.
- snapshot
Link StringId - The snapshot link id.
- snapshot
Name String - The name of the snapshot.
- snapshot
Type String - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - source
Disk StringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - status String
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - Map<String>
- A mapping of tags to assign to the snapshot.
- type String
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - usage String
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
getEcsSnapshots Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of Snapshot names.
- Snapshots
List<Pulumi.
Ali Cloud. Ecs. Outputs. Get Ecs Snapshots Snapshot> - A list of Ecs Snapshots. Each element contains the following attributes:
- Category string
- The category of the snapshot.
- Dry
Run bool - Encrypted bool
- Indicates whether the snapshot was encrypted.
- Kms
Key stringId - Name
Regex string - Output
File string - Resource
Group stringId - The ID of the resource group to which the snapshot belongs.
- Snapshot
Link stringId - Snapshot
Name string - The name of the snapshot.
- Snapshot
Type string - The type of the snapshot.
- Source
Disk stringType - The type of the source disk.
- Status string
- The status of the snapshot.
- Dictionary<string, string>
- The tags of the snapshot.
- Type string
- The type of the snapshot.
- Usage string
- Indicates whether the snapshot was used to create images or cloud disks.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of Snapshot names.
- Snapshots
[]Get
Ecs Snapshots Snapshot - A list of Ecs Snapshots. Each element contains the following attributes:
- Category string
- The category of the snapshot.
- Dry
Run bool - Encrypted bool
- Indicates whether the snapshot was encrypted.
- Kms
Key stringId - Name
Regex string - Output
File string - Resource
Group stringId - The ID of the resource group to which the snapshot belongs.
- Snapshot
Link stringId - Snapshot
Name string - The name of the snapshot.
- Snapshot
Type string - The type of the snapshot.
- Source
Disk stringType - The type of the source disk.
- Status string
- The status of the snapshot.
- map[string]string
- The tags of the snapshot.
- Type string
- The type of the snapshot.
- Usage string
- Indicates whether the snapshot was used to create images or cloud disks.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Snapshot names.
- snapshots
List<Get
Ecs Snapshots Snapshot> - A list of Ecs Snapshots. Each element contains the following attributes:
- category String
- The category of the snapshot.
- dry
Run Boolean - encrypted Boolean
- Indicates whether the snapshot was encrypted.
- kms
Key StringId - name
Regex String - output
File String - resource
Group StringId - The ID of the resource group to which the snapshot belongs.
- snapshot
Link StringId - snapshot
Name String - The name of the snapshot.
- snapshot
Type String - The type of the snapshot.
- source
Disk StringType - The type of the source disk.
- status String
- The status of the snapshot.
- Map<String,String>
- The tags of the snapshot.
- type String
- The type of the snapshot.
- usage String
- Indicates whether the snapshot was used to create images or cloud disks.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of Snapshot names.
- snapshots
Get
Ecs Snapshots Snapshot[] - A list of Ecs Snapshots. Each element contains the following attributes:
- category string
- The category of the snapshot.
- dry
Run boolean - encrypted boolean
- Indicates whether the snapshot was encrypted.
- kms
Key stringId - name
Regex string - output
File string - resource
Group stringId - The ID of the resource group to which the snapshot belongs.
- snapshot
Link stringId - snapshot
Name string - The name of the snapshot.
- snapshot
Type string - The type of the snapshot.
- source
Disk stringType - The type of the source disk.
- status string
- The status of the snapshot.
- {[key: string]: string}
- The tags of the snapshot.
- type string
- The type of the snapshot.
- usage string
- Indicates whether the snapshot was used to create images or cloud disks.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of Snapshot names.
- snapshots
Sequence[Get
Ecs Snapshots Snapshot] - A list of Ecs Snapshots. Each element contains the following attributes:
- category str
- The category of the snapshot.
- dry_
run bool - encrypted bool
- Indicates whether the snapshot was encrypted.
- kms_
key_ strid - name_
regex str - output_
file str - resource_
group_ strid - The ID of the resource group to which the snapshot belongs.
- snapshot_
link_ strid - snapshot_
name str - The name of the snapshot.
- snapshot_
type str - The type of the snapshot.
- source_
disk_ strtype - The type of the source disk.
- status str
- The status of the snapshot.
- Mapping[str, str]
- The tags of the snapshot.
- type str
- The type of the snapshot.
- usage str
- Indicates whether the snapshot was used to create images or cloud disks.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Snapshot names.
- snapshots List<Property Map>
- A list of Ecs Snapshots. Each element contains the following attributes:
- category String
- The category of the snapshot.
- dry
Run Boolean - encrypted Boolean
- Indicates whether the snapshot was encrypted.
- kms
Key StringId - name
Regex String - output
File String - resource
Group StringId - The ID of the resource group to which the snapshot belongs.
- snapshot
Link StringId - snapshot
Name String - The name of the snapshot.
- snapshot
Type String - The type of the snapshot.
- source
Disk StringType - The type of the source disk.
- status String
- The status of the snapshot.
- Map<String>
- The tags of the snapshot.
- type String
- The type of the snapshot.
- usage String
- Indicates whether the snapshot was used to create images or cloud disks.
Supporting Types
GetEcsSnapshotsSnapshot
- Category string
- The category of the snapshot. Valid Values:
flashandstandard. - Creation
Time string - The time when the snapshot was created.
- Description string
- The description of the snapshot.
- Disk
Id string - The ID of the source disk.
- Encrypted bool
- Specifies whether the snapshot is encrypted.
- Id string
- The ID of the Snapshot.
- Instant
Access bool - Indicates whether the instant access feature is enabled.
- Instant
Access intRetention Days - Indicates the validity period of the instant access feature.
- Name string
- The name of the snapshot.
- Product
Code string - The product code of the Alibaba Cloud Marketplace image.
- Progress string
- The progress of the snapshot creation task.
- Remain
Time int - The amount of remaining time required to create the snapshot.
- Resource
Group stringId - The resource group id.
- Retention
Days int - The retention period of the automatic snapshot.
- Snapshot
Id string - The ID of the snapshot.
- Snapshot
Name string - The name of the snapshot.
- Snapshot
Sn string - The serial number of the snapshot.
- Snapshot
Type string - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - Source
Disk stringId - The ID of the source disk.
- Source
Disk stringSize - The capacity of the source disk.
- Source
Disk stringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - Source
Storage stringType - The category of the source disk.
- Status string
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - Dictionary<string, string>
- A mapping of tags to assign to the snapshot.
- Type string
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - Usage string
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- Category string
- The category of the snapshot. Valid Values:
flashandstandard. - Creation
Time string - The time when the snapshot was created.
- Description string
- The description of the snapshot.
- Disk
Id string - The ID of the source disk.
- Encrypted bool
- Specifies whether the snapshot is encrypted.
- Id string
- The ID of the Snapshot.
- Instant
Access bool - Indicates whether the instant access feature is enabled.
- Instant
Access intRetention Days - Indicates the validity period of the instant access feature.
- Name string
- The name of the snapshot.
- Product
Code string - The product code of the Alibaba Cloud Marketplace image.
- Progress string
- The progress of the snapshot creation task.
- Remain
Time int - The amount of remaining time required to create the snapshot.
- Resource
Group stringId - The resource group id.
- Retention
Days int - The retention period of the automatic snapshot.
- Snapshot
Id string - The ID of the snapshot.
- Snapshot
Name string - The name of the snapshot.
- Snapshot
Sn string - The serial number of the snapshot.
- Snapshot
Type string - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - Source
Disk stringId - The ID of the source disk.
- Source
Disk stringSize - The capacity of the source disk.
- Source
Disk stringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - Source
Storage stringType - The category of the source disk.
- Status string
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - map[string]string
- A mapping of tags to assign to the snapshot.
- Type string
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - Usage string
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- category String
- The category of the snapshot. Valid Values:
flashandstandard. - creation
Time String - The time when the snapshot was created.
- description String
- The description of the snapshot.
- disk
Id String - The ID of the source disk.
- encrypted Boolean
- Specifies whether the snapshot is encrypted.
- id String
- The ID of the Snapshot.
- instant
Access Boolean - Indicates whether the instant access feature is enabled.
- instant
Access IntegerRetention Days - Indicates the validity period of the instant access feature.
- name String
- The name of the snapshot.
- product
Code String - The product code of the Alibaba Cloud Marketplace image.
- progress String
- The progress of the snapshot creation task.
- remain
Time Integer - The amount of remaining time required to create the snapshot.
- resource
Group StringId - The resource group id.
- retention
Days Integer - The retention period of the automatic snapshot.
- snapshot
Id String - The ID of the snapshot.
- snapshot
Name String - The name of the snapshot.
- snapshot
Sn String - The serial number of the snapshot.
- snapshot
Type String - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - source
Disk StringId - The ID of the source disk.
- source
Disk StringSize - The capacity of the source disk.
- source
Disk StringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - source
Storage StringType - The category of the source disk.
- status String
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - Map<String,String>
- A mapping of tags to assign to the snapshot.
- type String
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - usage String
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- category string
- The category of the snapshot. Valid Values:
flashandstandard. - creation
Time string - The time when the snapshot was created.
- description string
- The description of the snapshot.
- disk
Id string - The ID of the source disk.
- encrypted boolean
- Specifies whether the snapshot is encrypted.
- id string
- The ID of the Snapshot.
- instant
Access boolean - Indicates whether the instant access feature is enabled.
- instant
Access numberRetention Days - Indicates the validity period of the instant access feature.
- name string
- The name of the snapshot.
- product
Code string - The product code of the Alibaba Cloud Marketplace image.
- progress string
- The progress of the snapshot creation task.
- remain
Time number - The amount of remaining time required to create the snapshot.
- resource
Group stringId - The resource group id.
- retention
Days number - The retention period of the automatic snapshot.
- snapshot
Id string - The ID of the snapshot.
- snapshot
Name string - The name of the snapshot.
- snapshot
Sn string - The serial number of the snapshot.
- snapshot
Type string - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - source
Disk stringId - The ID of the source disk.
- source
Disk stringSize - The capacity of the source disk.
- source
Disk stringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - source
Storage stringType - The category of the source disk.
- status string
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - {[key: string]: string}
- A mapping of tags to assign to the snapshot.
- type string
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - usage string
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- category str
- The category of the snapshot. Valid Values:
flashandstandard. - creation_
time str - The time when the snapshot was created.
- description str
- The description of the snapshot.
- disk_
id str - The ID of the source disk.
- encrypted bool
- Specifies whether the snapshot is encrypted.
- id str
- The ID of the Snapshot.
- instant_
access bool - Indicates whether the instant access feature is enabled.
- instant_
access_ intretention_ days - Indicates the validity period of the instant access feature.
- name str
- The name of the snapshot.
- product_
code str - The product code of the Alibaba Cloud Marketplace image.
- progress str
- The progress of the snapshot creation task.
- remain_
time int - The amount of remaining time required to create the snapshot.
- resource_
group_ strid - The resource group id.
- retention_
days int - The retention period of the automatic snapshot.
- snapshot_
id str - The ID of the snapshot.
- snapshot_
name str - The name of the snapshot.
- snapshot_
sn str - The serial number of the snapshot.
- snapshot_
type str - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - source_
disk_ strid - The ID of the source disk.
- source_
disk_ strsize - The capacity of the source disk.
- source_
disk_ strtype - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - source_
storage_ strtype - The category of the source disk.
- status str
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - Mapping[str, str]
- A mapping of tags to assign to the snapshot.
- type str
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - usage str
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
- category String
- The category of the snapshot. Valid Values:
flashandstandard. - creation
Time String - The time when the snapshot was created.
- description String
- The description of the snapshot.
- disk
Id String - The ID of the source disk.
- encrypted Boolean
- Specifies whether the snapshot is encrypted.
- id String
- The ID of the Snapshot.
- instant
Access Boolean - Indicates whether the instant access feature is enabled.
- instant
Access NumberRetention Days - Indicates the validity period of the instant access feature.
- name String
- The name of the snapshot.
- product
Code String - The product code of the Alibaba Cloud Marketplace image.
- progress String
- The progress of the snapshot creation task.
- remain
Time Number - The amount of remaining time required to create the snapshot.
- resource
Group StringId - The resource group id.
- retention
Days Number - The retention period of the automatic snapshot.
- snapshot
Id String - The ID of the snapshot.
- snapshot
Name String - The name of the snapshot.
- snapshot
Sn String - The serial number of the snapshot.
- snapshot
Type String - The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - source
Disk StringId - The ID of the source disk.
- source
Disk StringSize - The capacity of the source disk.
- source
Disk StringType - The type of the disk for which the snapshot was created. Valid Values:
System,Data. - source
Storage StringType - The category of the source disk.
- status String
- The status of the snapshot. Valid Values:
accomplished,failed,progressingandall. - Map<String>
- A mapping of tags to assign to the snapshot.
- type String
- The type of the snapshot. Valid Values:
auto,userandall. Default to:all. - usage String
- A resource type that has a reference relationship. Valid Values:
image,disk,image_diskandnone.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
