Show / Hide Table of Contents

Class GetSnapshots

Inheritance
System.Object
GetSnapshots
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.Ecs
Assembly: Pulumi.AliCloud.dll
Syntax
public static class GetSnapshots

Methods

View Source

InvokeAsync(GetSnapshotsArgs, InvokeOptions)

Use this data source to get a list of snapshot according to the specified filters in an Alibaba Cloud account.

For information about snapshot and how to use it, see Snapshot.

NOTE: Available in 1.40.0+.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var snapshots = Output.Create(AliCloud.Ecs.GetSnapshots.InvokeAsync(new AliCloud.Ecs.GetSnapshotsArgs
    {
        Ids = 
        {
            "s-123456890abcdef",
        },
        NameRegex = "tf-testAcc-snapshot",
    }));
}

}

{{% /example %}} {{% /examples %}}

Argument Reference

The following arguments are supported:

  • instance_id - (Optional) The specified instance ID.
  • disk_id - (Optional) The specified disk ID.
  • encrypted - (Optional) Queries the encrypted snapshots. Optional values:
  • true: Encrypted snapshots.
  • false: No encryption attribute limit.

Default value: false.

  • ids - (Optional) A list of snapshot IDs.
  • name_regex - (Optional) A regex string to filter results by snapshot name.
  • status - (Optional) The specified snapshot status.
  • The snapshot status. Optional values:
  • progressing: The snapshots are being created.
  • accomplished: The snapshots are ready to use.
  • failed: The snapshot creation failed.
  • all: All status.

Default value: all.

  • type - (Optional) The snapshot category. Optional values:
  • auto: Auto snapshots.
  • user: Manual snapshots.
  • all: Auto and manual snapshots.

Default value: all.

  • source_disk_type - (Optional) The type of source disk:

  • System: The snapshots are created for system disks.

  • Data: The snapshots are created for data disks.

  • usage - (Optional) The usage of the snapshot:

  • image: The snapshots are used to create custom images.

  • disk: The snapshots are used to CreateDisk.

  • mage_disk: The snapshots are used to create custom images and data disks.

  • none: The snapshots are not used yet.

  • tags - (Optional) A map of tags assigned to snapshots.

  • output_file - (Optional) The name of output file that saves the filter results.

Declaration
public static Task<GetSnapshotsResult> InvokeAsync(GetSnapshotsArgs args = null, InvokeOptions options = null)
Parameters
Type Name Description
GetSnapshotsArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetSnapshotsResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.