get Ecs Snapshots
This data source provides the Ecs Snapshots of the current Alibaba Cloud user.
NOTE: Available in v1.120.0+.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
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 example = EcsFunctions.getEcsSnapshots(GetEcsSnapshotsArgs.builder()
.ids("s-bp1fvuxxxxxxxx")
.nameRegex("tf-test")
.build());
ctx.export("firstEcsSnapshotId", example.applyValue(getEcsSnapshotsResult -> getEcsSnapshotsResult.snapshots()[0].id()));
}
}
Return
A collection of values returned by getEcsSnapshots.
Parameters
A collection of arguments for invoking getEcsSnapshots.
Return
A collection of values returned by getEcsSnapshots.
See also
Parameters
The category of the snapshot.
Specifies whether to check the validity of the request without actually making the request.
Whether the snapshot is encrypted.
A list of Snapshot IDs.
The kms key id.
A regex string to filter results by Snapshot name.
File name where to save data source results (after running pulumi preview
).
The resource group id.
The snapshot link id.
Snapshot Display Name.
Snapshot creation type.
Source disk attributes.
The status of the snapshot.
The tags.
A resource type that has a reference relationship.
Return
A collection of values returned by getEcsSnapshots.
See also
Parameters
Builder for com.pulumi.alicloud.ecs.kotlin.inputs.GetEcsSnapshotsPlainArgs.