SnapshotArgs

data class SnapshotArgs(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<SnapshotArgs>

DEPRECATED: This resource has been renamed to alicloud.ecs.EcsSnapshot from version 1.120.0. Provides an ECS snapshot resource. For information about snapshot and how to use it, see Snapshot.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.Snapshot;
import com.pulumi.alicloud.ecs.SnapshotArgs;
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 snapshot = new Snapshot("snapshot", SnapshotArgs.builder()
.diskId(alicloud_disk_attachment.instance-attachment().disk_id())
.description("this snapshot is created for testing")
.tags(Map.of("version", "1.2"))
.build());
}
}

Import

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

$ pulumi import alicloud:ecs/snapshot:Snapshot snapshot s-abc1234567890000

Constructors

Link copied to clipboard
fun SnapshotArgs(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(): SnapshotArgs

Properties

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

Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.

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

The source disk ID.

Link copied to clipboard
val force: Output<Boolean>? = null
Link copied to clipboard
val instantAccess: Output<Boolean>? = null
Link copied to clipboard
val instantAccessRetentionDays: Output<Int>? = null
Link copied to clipboard
val name: Output<String>? = null

The name of the snapshot to be created. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-). It cannot start with auto, because snapshot names starting with auto are recognized as automatic snapshots.

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

The ID of the resource group.

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

A mapping of tags to assign to the resource.