UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

112 lines 5.56 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.SnapshotImport = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Imports a disk image from S3 as a Snapshot. * * ## Example Usage * * ```typescript * 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", * }, * }); * ``` */ class SnapshotImport extends pulumi.CustomResource { /** * Get an existing SnapshotImport resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new SnapshotImport(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SnapshotImport. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === SnapshotImport.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["clientData"] = state ? state.clientData : undefined; resourceInputs["dataEncryptionKeyId"] = state ? state.dataEncryptionKeyId : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["diskContainer"] = state ? state.diskContainer : undefined; resourceInputs["encrypted"] = state ? state.encrypted : undefined; resourceInputs["kmsKeyId"] = state ? state.kmsKeyId : undefined; resourceInputs["outpostArn"] = state ? state.outpostArn : undefined; resourceInputs["ownerAlias"] = state ? state.ownerAlias : undefined; resourceInputs["ownerId"] = state ? state.ownerId : undefined; resourceInputs["permanentRestore"] = state ? state.permanentRestore : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["roleName"] = state ? state.roleName : undefined; resourceInputs["storageTier"] = state ? state.storageTier : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["temporaryRestoreDays"] = state ? state.temporaryRestoreDays : undefined; resourceInputs["volumeId"] = state ? state.volumeId : undefined; resourceInputs["volumeSize"] = state ? state.volumeSize : undefined; } else { const args = argsOrState; if ((!args || args.diskContainer === undefined) && !opts.urn) { throw new Error("Missing required property 'diskContainer'"); } resourceInputs["clientData"] = args ? args.clientData : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["diskContainer"] = args ? args.diskContainer : undefined; resourceInputs["encrypted"] = args ? args.encrypted : undefined; resourceInputs["kmsKeyId"] = args ? args.kmsKeyId : undefined; resourceInputs["permanentRestore"] = args ? args.permanentRestore : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["roleName"] = args ? args.roleName : undefined; resourceInputs["storageTier"] = args ? args.storageTier : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["temporaryRestoreDays"] = args ? args.temporaryRestoreDays : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["dataEncryptionKeyId"] = undefined /*out*/; resourceInputs["outpostArn"] = undefined /*out*/; resourceInputs["ownerAlias"] = undefined /*out*/; resourceInputs["ownerId"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["volumeId"] = undefined /*out*/; resourceInputs["volumeSize"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(SnapshotImport.__pulumiType, name, resourceInputs, opts); } } exports.SnapshotImport = SnapshotImport; /** @internal */ SnapshotImport.__pulumiType = 'aws:ebs/snapshotImport:SnapshotImport'; //# sourceMappingURL=snapshotImport.js.map