UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

100 lines 5.82 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"); /** * Specifies an Amazon Elastic Block Store (Amazon EBS) volume. You can create an empty volume, a volume from a snapshot, or a volume copy from an existing source volume. * * > - When you use AWS CloudFormation to update an Amazon EBS volume that modifies `Iops` , `Size` , or `VolumeType` , there is a cooldown period before another operation can occur. This can cause your stack to report being in `UPDATE_IN_PROGRESS` or `UPDATE_ROLLBACK_IN_PROGRESS` for long periods of time. Some common scenarios when you might encounter a cooldown period for Amazon EBS include: * > * > - You successfully update an Amazon EBS volume and the update succeeds. When you attempt another update within the cooldown window, that update will be subject to a cooldown period. * > - You successfully update an Amazon EBS volume and the update succeeds but another change in your `update-stack` call fails. The rollback will be subject to a cooldown period. * > * > For more information, see [Requirements for EBS volume modifications](https://docs.aws.amazon.com/ebs/latest/userguide/modify-volume-requirements.html) . * > - Amazon EBS does not support sizing down an Amazon EBS volume. AWS CloudFormation does not attempt to modify an Amazon EBS volume to a smaller size on rollback. * * *DeletionPolicy attribute* * * To control how AWS CloudFormation handles the volume when the stack is deleted, set a deletion policy for your volume. You can choose to retain the volume, to delete the volume, or to create a snapshot of the volume. For more information, see [DeletionPolicy attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) . * * > If you set a deletion policy that creates a snapshot, all tags on the volume are included in the snapshot. */ 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new Volume(name, undefined, { ...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; } /** * Create a Volume resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { resourceInputs["autoEnableIo"] = args?.autoEnableIo; resourceInputs["availabilityZone"] = args?.availabilityZone; resourceInputs["availabilityZoneId"] = args?.availabilityZoneId; resourceInputs["encrypted"] = args?.encrypted; resourceInputs["iops"] = args?.iops; resourceInputs["kmsKeyId"] = args?.kmsKeyId; resourceInputs["multiAttachEnabled"] = args?.multiAttachEnabled; resourceInputs["outpostArn"] = args?.outpostArn; resourceInputs["size"] = args?.size; resourceInputs["snapshotId"] = args?.snapshotId; resourceInputs["sourceVolumeId"] = args?.sourceVolumeId; resourceInputs["tags"] = args?.tags; resourceInputs["throughput"] = args?.throughput; resourceInputs["volumeInitializationRate"] = args?.volumeInitializationRate; resourceInputs["volumeType"] = args?.volumeType; resourceInputs["volumeId"] = undefined /*out*/; } else { resourceInputs["autoEnableIo"] = undefined /*out*/; resourceInputs["availabilityZone"] = undefined /*out*/; resourceInputs["availabilityZoneId"] = undefined /*out*/; resourceInputs["encrypted"] = undefined /*out*/; resourceInputs["iops"] = undefined /*out*/; resourceInputs["kmsKeyId"] = undefined /*out*/; resourceInputs["multiAttachEnabled"] = undefined /*out*/; resourceInputs["outpostArn"] = undefined /*out*/; resourceInputs["size"] = undefined /*out*/; resourceInputs["snapshotId"] = undefined /*out*/; resourceInputs["sourceVolumeId"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["throughput"] = undefined /*out*/; resourceInputs["volumeId"] = undefined /*out*/; resourceInputs["volumeInitializationRate"] = undefined /*out*/; resourceInputs["volumeType"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Volume.__pulumiType, name, resourceInputs, opts); } } exports.Volume = Volume; /** @internal */ Volume.__pulumiType = 'aws-native:ec2:Volume'; //# sourceMappingURL=volume.js.map