UNPKG

@pulumi/aws

Version:

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

150 lines 6.97 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.OntapVolume = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages a FSx ONTAP Volume. * See the [FSx ONTAP User Guide](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-volumes.html) for more information. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.fsx.OntapVolume("test", { * name: "test", * junctionPath: "/test", * sizeInMegabytes: 1024, * storageEfficiencyEnabled: true, * storageVirtualMachineId: testAwsFsxOntapStorageVirtualMachine.id, * }); * ``` * * ### Using Tiering Policy * * Additional information on tiering policy with ONTAP Volumes can be found in the [FSx ONTAP Guide](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/managing-volumes.html). * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.fsx.OntapVolume("test", { * name: "test", * junctionPath: "/test", * sizeInMegabytes: 1024, * storageEfficiencyEnabled: true, * storageVirtualMachineId: testAwsFsxOntapStorageVirtualMachine.id, * tieringPolicy: { * name: "AUTO", * coolingPeriod: 31, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import FSx ONTAP volume using the `id`. For example: * * ```sh * $ pulumi import aws:fsx/ontapVolume:OntapVolume example fsvol-12345678abcdef123 * ``` */ class OntapVolume extends pulumi.CustomResource { /** * Get an existing OntapVolume 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 OntapVolume(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of OntapVolume. 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'] === OntapVolume.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["aggregateConfiguration"] = state?.aggregateConfiguration; resourceInputs["arn"] = state?.arn; resourceInputs["bypassSnaplockEnterpriseRetention"] = state?.bypassSnaplockEnterpriseRetention; resourceInputs["copyTagsToBackups"] = state?.copyTagsToBackups; resourceInputs["fileSystemId"] = state?.fileSystemId; resourceInputs["finalBackupTags"] = state?.finalBackupTags; resourceInputs["flexcacheEndpointType"] = state?.flexcacheEndpointType; resourceInputs["junctionPath"] = state?.junctionPath; resourceInputs["name"] = state?.name; resourceInputs["ontapVolumeType"] = state?.ontapVolumeType; resourceInputs["region"] = state?.region; resourceInputs["securityStyle"] = state?.securityStyle; resourceInputs["sizeInBytes"] = state?.sizeInBytes; resourceInputs["sizeInMegabytes"] = state?.sizeInMegabytes; resourceInputs["skipFinalBackup"] = state?.skipFinalBackup; resourceInputs["snaplockConfiguration"] = state?.snaplockConfiguration; resourceInputs["snapshotPolicy"] = state?.snapshotPolicy; resourceInputs["storageEfficiencyEnabled"] = state?.storageEfficiencyEnabled; resourceInputs["storageVirtualMachineId"] = state?.storageVirtualMachineId; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["tieringPolicy"] = state?.tieringPolicy; resourceInputs["uuid"] = state?.uuid; resourceInputs["volumeStyle"] = state?.volumeStyle; resourceInputs["volumeType"] = state?.volumeType; } else { const args = argsOrState; if (args?.storageVirtualMachineId === undefined && !opts.urn) { throw new Error("Missing required property 'storageVirtualMachineId'"); } resourceInputs["aggregateConfiguration"] = args?.aggregateConfiguration; resourceInputs["bypassSnaplockEnterpriseRetention"] = args?.bypassSnaplockEnterpriseRetention; resourceInputs["copyTagsToBackups"] = args?.copyTagsToBackups; resourceInputs["finalBackupTags"] = args?.finalBackupTags; resourceInputs["junctionPath"] = args?.junctionPath; resourceInputs["name"] = args?.name; resourceInputs["ontapVolumeType"] = args?.ontapVolumeType; resourceInputs["region"] = args?.region; resourceInputs["securityStyle"] = args?.securityStyle; resourceInputs["sizeInBytes"] = args?.sizeInBytes; resourceInputs["sizeInMegabytes"] = args?.sizeInMegabytes; resourceInputs["skipFinalBackup"] = args?.skipFinalBackup; resourceInputs["snaplockConfiguration"] = args?.snaplockConfiguration; resourceInputs["snapshotPolicy"] = args?.snapshotPolicy; resourceInputs["storageEfficiencyEnabled"] = args?.storageEfficiencyEnabled; resourceInputs["storageVirtualMachineId"] = args?.storageVirtualMachineId; resourceInputs["tags"] = args?.tags; resourceInputs["tieringPolicy"] = args?.tieringPolicy; resourceInputs["volumeStyle"] = args?.volumeStyle; resourceInputs["volumeType"] = args?.volumeType; resourceInputs["arn"] = undefined /*out*/; resourceInputs["fileSystemId"] = undefined /*out*/; resourceInputs["flexcacheEndpointType"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["uuid"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(OntapVolume.__pulumiType, name, resourceInputs, opts); } } exports.OntapVolume = OntapVolume; /** @internal */ OntapVolume.__pulumiType = 'aws:fsx/ontapVolume:OntapVolume'; //# sourceMappingURL=ontapVolume.js.map