Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.eds.getSnapshots
Explore with Pulumi AI
This data source provides the Ecd Snapshots of the current Alibaba Cloud user.
NOTE: Available in v1.169.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.eds.getSnapshots({});
export const ecdSnapshotId1 = ids.then(ids => ids.snapshots?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.eds.get_snapshots()
pulumi.export("ecdSnapshotId1", ids.snapshots[0].id)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eds"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := eds.GetSnapshots(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("ecdSnapshotId1", ids.Snapshots[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Eds.GetSnapshots.Invoke();
    return new Dictionary<string, object?>
    {
        ["ecdSnapshotId1"] = ids.Apply(getSnapshotsResult => getSnapshotsResult.Snapshots[0]?.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.eds.EdsFunctions;
import com.pulumi.alicloud.eds.inputs.GetSnapshotsArgs;
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 ids = EdsFunctions.getSnapshots();
        ctx.export("ecdSnapshotId1", ids.applyValue(getSnapshotsResult -> getSnapshotsResult.snapshots()[0].id()));
    }
}
variables:
  ids:
    fn::invoke:
      Function: alicloud:eds:getSnapshots
      Arguments: {}
outputs:
  ecdSnapshotId1: ${ids.snapshots[0].id}
Using getSnapshots
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 getSnapshots(args: GetSnapshotsArgs, opts?: InvokeOptions): Promise<GetSnapshotsResult>
function getSnapshotsOutput(args: GetSnapshotsOutputArgs, opts?: InvokeOptions): Output<GetSnapshotsResult>def get_snapshots(desktop_id: Optional[str] = None,
                  ids: Optional[Sequence[str]] = None,
                  name_regex: Optional[str] = None,
                  output_file: Optional[str] = None,
                  snapshot_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetSnapshotsResult
def get_snapshots_output(desktop_id: Optional[pulumi.Input[str]] = None,
                  ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  name_regex: Optional[pulumi.Input[str]] = None,
                  output_file: Optional[pulumi.Input[str]] = None,
                  snapshot_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetSnapshotsResult]func GetSnapshots(ctx *Context, args *GetSnapshotsArgs, opts ...InvokeOption) (*GetSnapshotsResult, error)
func GetSnapshotsOutput(ctx *Context, args *GetSnapshotsOutputArgs, opts ...InvokeOption) GetSnapshotsResultOutput> Note: This function is named GetSnapshots in the Go SDK.
public static class GetSnapshots 
{
    public static Task<GetSnapshotsResult> InvokeAsync(GetSnapshotsArgs args, InvokeOptions? opts = null)
    public static Output<GetSnapshotsResult> Invoke(GetSnapshotsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSnapshotsResult> getSnapshots(GetSnapshotsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:eds/getSnapshots:getSnapshots
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Desktop
Id string - The ID of the Desktop.
 - Ids List<string>
 - A list of Snapshot IDs.
 - 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). - Snapshot
Id string - The ID of the Snapshot.
 
- Desktop
Id string - The ID of the Desktop.
 - Ids []string
 - A list of Snapshot IDs.
 - 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). - Snapshot
Id string - The ID of the Snapshot.
 
- desktop
Id String - The ID of the Desktop.
 - ids List<String>
 - A list of Snapshot IDs.
 - 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). - snapshot
Id String - The ID of the Snapshot.
 
- desktop
Id string - The ID of the Desktop.
 - ids string[]
 - A list of Snapshot IDs.
 - 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). - snapshot
Id string - The ID of the Snapshot.
 
- desktop_
id str - The ID of the Desktop.
 - ids Sequence[str]
 - A list of Snapshot IDs.
 - 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). - snapshot_
id str - The ID of the Snapshot.
 
- desktop
Id String - The ID of the Desktop.
 - ids List<String>
 - A list of Snapshot IDs.
 - 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). - snapshot
Id String - The ID of the Snapshot.
 
getSnapshots Result
The following output properties are available:
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Ids List<string>
 - Names List<string>
 - Snapshots
List<Pulumi.
Ali Cloud. Eds. Outputs. Get Snapshots Snapshot>  - Desktop
Id string - Name
Regex string - Output
File string - Snapshot
Id string 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Ids []string
 - Names []string
 - Snapshots
[]Get
Snapshots Snapshot  - Desktop
Id string - Name
Regex string - Output
File string - Snapshot
Id string 
- id String
 - The provider-assigned unique ID for this managed resource.
 - ids List<String>
 - names List<String>
 - snapshots
List<Get
Snapshots Snapshot>  - desktop
Id String - name
Regex String - output
File String - snapshot
Id String 
- id string
 - The provider-assigned unique ID for this managed resource.
 - ids string[]
 - names string[]
 - snapshots
Get
Snapshots Snapshot[]  - desktop
Id string - name
Regex string - output
File string - snapshot
Id string 
- id str
 - The provider-assigned unique ID for this managed resource.
 - ids Sequence[str]
 - names Sequence[str]
 - snapshots
Sequence[Get
Snapshots Snapshot]  - desktop_
id str - name_
regex str - output_
file str - snapshot_
id str 
- id String
 - The provider-assigned unique ID for this managed resource.
 - ids List<String>
 - names List<String>
 - snapshots List<Property Map>
 - desktop
Id String - name
Regex String - output
File String - snapshot
Id String 
Supporting Types
GetSnapshotsSnapshot  
- Create
Time string - The time when the snapshot was created.
 - Description string
 - The description of the snapshot.
 - Desktop
Id string - The ID of the cloud desktop to which the snapshot belongs.
 - Id string
 - The ID of the Snapshot.
 - Progress string
 - The progress of creating the snapshot.
 - Remain
Time int - The remaining time that is required to create the snapshot. Unit: seconds.
 - Snapshot
Id string - The ID of the snapshot.
 - Snapshot
Name string - The name of the snapshot.
 - Snapshot
Type string - The type of the snapshot.
 - Source
Disk stringSize  - The capacity of the source disk. Unit: GiB.
 - Source
Disk stringType  - The type of the source disk.
 - Status string
 - The status of the snapshot.
 
- Create
Time string - The time when the snapshot was created.
 - Description string
 - The description of the snapshot.
 - Desktop
Id string - The ID of the cloud desktop to which the snapshot belongs.
 - Id string
 - The ID of the Snapshot.
 - Progress string
 - The progress of creating the snapshot.
 - Remain
Time int - The remaining time that is required to create the snapshot. Unit: seconds.
 - Snapshot
Id string - The ID of the snapshot.
 - Snapshot
Name string - The name of the snapshot.
 - Snapshot
Type string - The type of the snapshot.
 - Source
Disk stringSize  - The capacity of the source disk. Unit: GiB.
 - Source
Disk stringType  - The type of the source disk.
 - Status string
 - The status of the snapshot.
 
- create
Time String - The time when the snapshot was created.
 - description String
 - The description of the snapshot.
 - desktop
Id String - The ID of the cloud desktop to which the snapshot belongs.
 - id String
 - The ID of the Snapshot.
 - progress String
 - The progress of creating the snapshot.
 - remain
Time Integer - The remaining time that is required to create the snapshot. Unit: seconds.
 - snapshot
Id String - The ID of the snapshot.
 - snapshot
Name String - The name of the snapshot.
 - snapshot
Type String - The type of the snapshot.
 - source
Disk StringSize  - The capacity of the source disk. Unit: GiB.
 - source
Disk StringType  - The type of the source disk.
 - status String
 - The status of the snapshot.
 
- create
Time string - The time when the snapshot was created.
 - description string
 - The description of the snapshot.
 - desktop
Id string - The ID of the cloud desktop to which the snapshot belongs.
 - id string
 - The ID of the Snapshot.
 - progress string
 - The progress of creating the snapshot.
 - remain
Time number - The remaining time that is required to create the snapshot. Unit: seconds.
 - snapshot
Id string - The ID of the snapshot.
 - snapshot
Name string - The name of the snapshot.
 - snapshot
Type string - The type of the snapshot.
 - source
Disk stringSize  - The capacity of the source disk. Unit: GiB.
 - source
Disk stringType  - The type of the source disk.
 - status string
 - The status of the snapshot.
 
- create_
time str - The time when the snapshot was created.
 - description str
 - The description of the snapshot.
 - desktop_
id str - The ID of the cloud desktop to which the snapshot belongs.
 - id str
 - The ID of the Snapshot.
 - progress str
 - The progress of creating the snapshot.
 - remain_
time int - The remaining time that is required to create the snapshot. Unit: seconds.
 - snapshot_
id str - The ID of the snapshot.
 - snapshot_
name str - The name of the snapshot.
 - snapshot_
type str - The type of the snapshot.
 - source_
disk_ strsize  - The capacity of the source disk. Unit: GiB.
 - source_
disk_ strtype  - The type of the source disk.
 - status str
 - The status of the snapshot.
 
- create
Time String - The time when the snapshot was created.
 - description String
 - The description of the snapshot.
 - desktop
Id String - The ID of the cloud desktop to which the snapshot belongs.
 - id String
 - The ID of the Snapshot.
 - progress String
 - The progress of creating the snapshot.
 - remain
Time Number - The remaining time that is required to create the snapshot. Unit: seconds.
 - snapshot
Id String - The ID of the snapshot.
 - snapshot
Name String - The name of the snapshot.
 - snapshot
Type String - The type of the snapshot.
 - source
Disk StringSize  - The capacity of the source disk. Unit: GiB.
 - source
Disk StringType  - The type of the source disk.
 - status String
 - The status of the snapshot.
 
Package Details
- Repository
 - Alibaba Cloud pulumi/pulumi-alicloud
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
alicloudTerraform Provider.