UNPKG

@pulumi/aws

Version:

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

110 lines 4.57 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.Volume = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a single EBS volume. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.ebs.Volume("example", { * availabilityZone: "us-west-2a", * size: 40, * tags: { * Name: "HelloWorld", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import EBS Volumes using the `id`. For example: * * ```sh * $ pulumi import aws:ebs/volume:Volume id vol-049df61146c4d7901 * ``` */ class Volume extends pulumi.CustomResource { /** * Get an existing Volume 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 Volume(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Volume. 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'] === Volume.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["availabilityZone"] = state?.availabilityZone; resourceInputs["createTime"] = state?.createTime; resourceInputs["encrypted"] = state?.encrypted; resourceInputs["finalSnapshot"] = state?.finalSnapshot; resourceInputs["iops"] = state?.iops; resourceInputs["kmsKeyId"] = state?.kmsKeyId; resourceInputs["multiAttachEnabled"] = state?.multiAttachEnabled; resourceInputs["outpostArn"] = state?.outpostArn; resourceInputs["region"] = state?.region; resourceInputs["size"] = state?.size; resourceInputs["snapshotId"] = state?.snapshotId; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["throughput"] = state?.throughput; resourceInputs["type"] = state?.type; resourceInputs["volumeInitializationRate"] = state?.volumeInitializationRate; } else { const args = argsOrState; if (args?.availabilityZone === undefined && !opts.urn) { throw new Error("Missing required property 'availabilityZone'"); } resourceInputs["availabilityZone"] = args?.availabilityZone; resourceInputs["encrypted"] = args?.encrypted; resourceInputs["finalSnapshot"] = args?.finalSnapshot; resourceInputs["iops"] = args?.iops; resourceInputs["kmsKeyId"] = args?.kmsKeyId; resourceInputs["multiAttachEnabled"] = args?.multiAttachEnabled; resourceInputs["outpostArn"] = args?.outpostArn; resourceInputs["region"] = args?.region; resourceInputs["size"] = args?.size; resourceInputs["snapshotId"] = args?.snapshotId; resourceInputs["tags"] = args?.tags; resourceInputs["throughput"] = args?.throughput; resourceInputs["type"] = args?.type; resourceInputs["volumeInitializationRate"] = args?.volumeInitializationRate; resourceInputs["arn"] = undefined /*out*/; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Volume.__pulumiType, name, resourceInputs, opts); } } exports.Volume = Volume; /** @internal */ Volume.__pulumiType = 'aws:ebs/volume:Volume'; //# sourceMappingURL=volume.js.map