SnapshotImportArgs

data class SnapshotImportArgs(val clientData: Output<SnapshotImportClientDataArgs>? = null, val description: Output<String>? = null, val diskContainer: Output<SnapshotImportDiskContainerArgs>? = null, val encrypted: Output<Boolean>? = null, val kmsKeyId: Output<String>? = null, val permanentRestore: Output<Boolean>? = null, val roleName: Output<String>? = null, val storageTier: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val temporaryRestoreDays: Output<Int>? = null) : ConvertibleToJava<SnapshotImportArgs>

Imports a disk image from S3 as a Snapshot.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ebs.SnapshotImport("example", {
diskContainer: {
format: "VHD",
userBucket: {
s3Bucket: "disk-images",
s3Key: "source.vhd",
},
},
roleName: "disk-image-import",
tags: {
Name: "HelloWorld",
},
});
import pulumi
import pulumi_aws as aws
example = aws.ebs.SnapshotImport("example",
disk_container={
"format": "VHD",
"user_bucket": {
"s3_bucket": "disk-images",
"s3_key": "source.vhd",
},
},
role_name="disk-image-import",
tags={
"Name": "HelloWorld",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Ebs.SnapshotImport("example", new()
{
DiskContainer = new Aws.Ebs.Inputs.SnapshotImportDiskContainerArgs
{
Format = "VHD",
UserBucket = new Aws.Ebs.Inputs.SnapshotImportDiskContainerUserBucketArgs
{
S3Bucket = "disk-images",
S3Key = "source.vhd",
},
},
RoleName = "disk-image-import",
Tags =
{
{ "Name", "HelloWorld" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ebs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ebs.NewSnapshotImport(ctx, "example", &ebs.SnapshotImportArgs{
DiskContainer: &ebs.SnapshotImportDiskContainerArgs{
Format: pulumi.String("VHD"),
UserBucket: &ebs.SnapshotImportDiskContainerUserBucketArgs{
S3Bucket: pulumi.String("disk-images"),
S3Key: pulumi.String("source.vhd"),
},
},
RoleName: pulumi.String("disk-image-import"),
Tags: pulumi.StringMap{
"Name": pulumi.String("HelloWorld"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ebs.SnapshotImport;
import com.pulumi.aws.ebs.SnapshotImportArgs;
import com.pulumi.aws.ebs.inputs.SnapshotImportDiskContainerArgs;
import com.pulumi.aws.ebs.inputs.SnapshotImportDiskContainerUserBucketArgs;
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 example = new SnapshotImport("example", SnapshotImportArgs.builder()
.diskContainer(SnapshotImportDiskContainerArgs.builder()
.format("VHD")
.userBucket(SnapshotImportDiskContainerUserBucketArgs.builder()
.s3Bucket("disk-images")
.s3Key("source.vhd")
.build())
.build())
.roleName("disk-image-import")
.tags(Map.of("Name", "HelloWorld"))
.build());
}
}
resources:
example:
type: aws:ebs:SnapshotImport
properties:
diskContainer:
format: VHD
userBucket:
s3Bucket: disk-images
s3Key: source.vhd
roleName: disk-image-import
tags:
Name: HelloWorld

Constructors

Link copied to clipboard
constructor(clientData: Output<SnapshotImportClientDataArgs>? = null, description: Output<String>? = null, diskContainer: Output<SnapshotImportDiskContainerArgs>? = null, encrypted: Output<Boolean>? = null, kmsKeyId: Output<String>? = null, permanentRestore: Output<Boolean>? = null, roleName: Output<String>? = null, storageTier: Output<String>? = null, tags: Output<Map<String, String>>? = null, temporaryRestoreDays: Output<Int>? = null)

Properties

Link copied to clipboard

The client-specific data. Detailed below.

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

The description string for the import snapshot task.

Link copied to clipboard

Information about the disk container. Detailed below.

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

Specifies whether the destination snapshot of the imported image should be encrypted. The default KMS key for EBS is used unless you specify a non-default KMS key using KmsKeyId.

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

An identifier for the symmetric KMS key to use when creating the encrypted snapshot. This parameter is only required if you want to use a non-default KMS key; if this parameter is not specified, the default KMS key for EBS is used. If a KmsKeyId is specified, the Encrypted flag must also be set.

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

Indicates whether to permanently restore an archived snapshot.

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

The name of the IAM Role the VM Import/Export service will assume. This role needs certain permissions. See https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-role. Default: vmimport

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

The name of the storage tier. Valid values are archive and standard. Default value is standard.

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

A map of tags to assign to the snapshot.

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

Specifies the number of days for which to temporarily restore an archived snapshot. Required for temporary restores only. The snapshot will be automatically re-archived after this period.

Functions

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