EcsSnapshotArgs

data class EcsSnapshotArgs(val category: Output<String>? = null, val description: Output<String>? = null, val diskId: Output<String>? = null, val force: Output<Boolean>? = null, val instantAccess: Output<Boolean>? = null, val instantAccessRetentionDays: Output<Int>? = null, val name: Output<String>? = null, val resourceGroupId: Output<String>? = null, val retentionDays: Output<Int>? = null, val snapshotName: Output<String>? = null, val tags: Output<Map<String, Any>>? = null) : ConvertibleToJava<EcsSnapshotArgs>

Provides a ECS Snapshot resource. For information about ECS Snapshot and how to use it, see What is Snapshot.

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.EcsSnapshot;
import com.pulumi.alicloud.ecs.EcsSnapshotArgs;
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) {
var default_ = new EcsSnapshot("default", EcsSnapshotArgs.builder()
.category("standard")
.description("Test For Terraform")
.diskId("d-gw8csgxxxxxxxxx")
.retentionDays("20")
.snapshotName("tf-test")
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "Acceptance-test")
))
.build());
}
}

Import

ECS Snapshot can be imported using the id, e.g.

$ pulumi import alicloud:ecs/ecsSnapshot:EcsSnapshot example <id>

Constructors

Link copied to clipboard
fun EcsSnapshotArgs(category: Output<String>? = null, description: Output<String>? = null, diskId: Output<String>? = null, force: Output<Boolean>? = null, instantAccess: Output<Boolean>? = null, instantAccessRetentionDays: Output<Int>? = null, name: Output<String>? = null, resourceGroupId: Output<String>? = null, retentionDays: Output<Int>? = null, snapshotName: Output<String>? = null, tags: Output<Map<String, Any>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): EcsSnapshotArgs

Properties

Link copied to clipboard
val category: Output<String>? = null

The category of the snapshot. Valid Values: standard and flash.

Link copied to clipboard
val description: Output<String>? = null

The description of the snapshot.

Link copied to clipboard
val diskId: Output<String>? = null

The ID of the disk.

Link copied to clipboard
val force: Output<Boolean>? = null

Specifies whether to forcibly delete the snapshot that has been used to create disks.

Link copied to clipboard
val instantAccess: Output<Boolean>? = null

Specifies whether to enable the instant access feature.

Link copied to clipboard
val instantAccessRetentionDays: Output<Int>? = null

Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.

Link copied to clipboard
val name: Output<String>? = null

Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The resource group id.

Link copied to clipboard
val retentionDays: Output<Int>? = null

The retention period of the snapshot.

Link copied to clipboard
val snapshotName: Output<String>? = null

The name of the snapshot.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

A mapping of tags to assign to the snapshot.