get Server Snapshots
This data source provides the Simple Application Server Snapshots of the current Alibaba Cloud user.
NOTE: Available in v1.143.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.simpleapplicationserver.SimpleapplicationserverFunctions;
import com.pulumi.alicloud.simpleapplicationserver.inputs.GetServerSnapshotsArgs;
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 = SimpleapplicationserverFunctions.getServerSnapshots(GetServerSnapshotsArgs.builder()
.ids("example_id")
.build());
ctx.export("simpleApplicationServerSnapshotId1", ids.applyValue(getServerSnapshotsResult -> getServerSnapshotsResult.snapshots()[0].id()));
final var nameRegex = SimpleapplicationserverFunctions.getServerSnapshots(GetServerSnapshotsArgs.builder()
.nameRegex("^my-Snapshot")
.build());
ctx.export("simpleApplicationServerSnapshotId2", nameRegex.applyValue(getServerSnapshotsResult -> getServerSnapshotsResult.snapshots()[0].id()));
final var diskIdConf = SimpleapplicationserverFunctions.getServerSnapshots(GetServerSnapshotsArgs.builder()
.ids("example_id")
.diskId("example_value")
.build());
ctx.export("simpleApplicationServerSnapshotId3", diskIdConf.applyValue(getServerSnapshotsResult -> getServerSnapshotsResult.snapshots()[0].id()));
final var instanceIdConf = SimpleapplicationserverFunctions.getServerSnapshots(GetServerSnapshotsArgs.builder()
.ids("example_id")
.instanceId("example_value")
.build());
ctx.export("simpleApplicationServerSnapshotId4", instanceIdConf.applyValue(getServerSnapshotsResult -> getServerSnapshotsResult.snapshots()[0].id()));
}
}
Return
A collection of values returned by getServerSnapshots.
Parameters
A collection of arguments for invoking getServerSnapshots.
Return
A collection of values returned by getServerSnapshots.
See also
Parameters
The ID of the source disk. This parameter has a value even after the source disk is released.
A list of Snapshot IDs.
The ID of the simple application server.
A regex string to filter results by Snapshot name.
File name where to save data source results (after running pulumi preview
).
The status of the snapshots. Valid values: Progressing
, Accomplished
and Failed
.
Return
A collection of values returned by getServerSnapshots.
See also
Parameters
Builder for com.pulumi.alicloud.simpleapplicationserver.kotlin.inputs.GetServerSnapshotsPlainArgs.