UNPKG

@pulumi/aws

Version:

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

88 lines 3.62 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.FastSnapshotRestore = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an EBS (Elastic Block Storage) Fast Snapshot Restore. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ebs.FastSnapshotRestore("example", { * availabilityZone: "us-west-2a", * snapshotId: exampleAwsEbsSnapshot.id, * }); * ``` * * ## Import * * Using `pulumi import`, import EC2 (Elastic Compute Cloud) EBS Fast Snapshot Restore using the `availability_zone` and `snapshot_id` separated by `,`. For example: * * ```sh * $ pulumi import aws:ebs/fastSnapshotRestore:FastSnapshotRestore example us-west-2a,snap-abcdef123456 * ``` */ class FastSnapshotRestore extends pulumi.CustomResource { /** * Get an existing FastSnapshotRestore 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 FastSnapshotRestore(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of FastSnapshotRestore. 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'] === FastSnapshotRestore.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["availabilityZone"] = state?.availabilityZone; resourceInputs["region"] = state?.region; resourceInputs["snapshotId"] = state?.snapshotId; resourceInputs["state"] = state?.state; resourceInputs["timeouts"] = state?.timeouts; } else { const args = argsOrState; if (args?.availabilityZone === undefined && !opts.urn) { throw new Error("Missing required property 'availabilityZone'"); } if (args?.snapshotId === undefined && !opts.urn) { throw new Error("Missing required property 'snapshotId'"); } resourceInputs["availabilityZone"] = args?.availabilityZone; resourceInputs["region"] = args?.region; resourceInputs["snapshotId"] = args?.snapshotId; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["state"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(FastSnapshotRestore.__pulumiType, name, resourceInputs, opts); } } exports.FastSnapshotRestore = FastSnapshotRestore; /** @internal */ FastSnapshotRestore.__pulumiType = 'aws:ebs/fastSnapshotRestore:FastSnapshotRestore'; //# sourceMappingURL=fastSnapshotRestore.js.map