SnapshotImport class
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: {
userBucket: {
s3Bucket: "disk-images",
s3Key: "source.vhd",
},
format: "VHD",
},
roleName: "disk-image-import",
tags: {
Name: "HelloWorld",
},
});
import pulumi
import pulumi_aws as aws
example = aws.ebs.SnapshotImport("example",
disk_container={
"user_bucket": {
"s3_bucket": "disk-images",
"s3_key": "source.vhd",
},
"format": "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
{
UserBucket = new Aws.Ebs.Inputs.SnapshotImportDiskContainerUserBucketArgs
{
S3Bucket = "disk-images",
S3Key = "source.vhd",
},
Format = "VHD",
},
RoleName = "disk-image-import",
Tags =
{
{ "Name", "HelloWorld" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/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{
UserBucket: &ebs.SnapshotImportDiskContainerUserBucketArgs{
S3Bucket: pulumi.String("disk-images"),
S3Key: pulumi.String("source.vhd"),
},
Format: pulumi.String("VHD"),
},
RoleName: pulumi.String("disk-image-import"),
Tags: pulumi.StringMap{
"Name": pulumi.String("HelloWorld"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_ebs_snapshotimport" "example" {
disk_container = {
user_bucket = {
s3_bucket = "disk-images"
s3_key = "source.vhd"
}
format = "VHD"
}
role_name = "disk-image-import"
tags = {
"Name" = "HelloWorld"
}
}
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.ArrayList;
import java.util.Arrays;
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()
.userBucket(SnapshotImportDiskContainerUserBucketArgs.builder()
.s3Bucket("disk-images")
.s3Key("source.vhd")
.build())
.format("VHD")
.build())
.roleName("disk-image-import")
.tags(Map.of("Name", "HelloWorld"))
.build());
}
}
resources:
example:
type: aws:ebs:SnapshotImport
properties:
diskContainer:
userBucket:
s3Bucket: disk-images
s3Key: source.vhd
format: VHD
roleName: disk-image-import
tags:
Name: HelloWorld
Constructors
- SnapshotImport(String name, {SnapshotImportArgs? args, CustomResourceOptions? options})
-
Creates a new SnapshotImport.
nameThe Pulumi resource name.argsArguments used to configure this SnapshotImport. The set of arguments for SnapshotImport.optionsResource options controlling this resource's behavior. - SnapshotImport.reference(String urn)
- Creates a typed reference to an existing SnapshotImport resource.
Properties
-
arn
↔ Output<
String> -
ARN of the EBS Snapshot.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
clientData
↔ Output<
SnapshotImportClientData?> -
The client-specific data. Detailed below.
latefinal
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
dataEncryptionKeyId
↔ Output<
String> -
The data encryption key identifier for the snapshot.
latefinal
-
description
↔ Output<
String> -
The description string for the import snapshot task.
latefinal
-
diskContainer
↔ Output<
SnapshotImportDiskContainer> -
Information about the disk container. Detailed below.
latefinal
-
encrypted
↔ Output<
bool?> -
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.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
kmsKeyId
↔ Output<
String?> -
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.
latefinal
-
outpostArn
↔ Output<
String> -
latefinal
-
ownerAlias
↔ Output<
String> -
Value from an Amazon-maintained list (
amazon,aws-marketplace,microsoft) of snapshot owners.latefinal -
ownerId
↔ Output<
String> -
The AWS account ID of the EBS snapshot owner.
latefinal
-
permanentRestore
↔ Output<
bool?> -
Indicates whether to permanently restore an archived snapshot.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
roleName
↔ Output<
String?> -
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:
vmimportlatefinal - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
storageTier
↔ Output<
String> -
The name of the storage tier. Valid values are
archiveandstandard. Default value isstandard.latefinal -
A map of tags to assign to the snapshot.
latefinal
-
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
temporaryRestoreDays
↔ Output<
int?> -
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.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
-
volumeId
↔ Output<
String> -
latefinal
-
volumeSize
↔ Output<
int> -
The size of the drive in GiBs.
latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {SnapshotImportState? state, CustomResourceOptions? options}) → SnapshotImport -
Gets an existing SnapshotImport resource's state with the given
nameandid.