@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
150 lines • 7.84 kB
JavaScript
;
// *** 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, Object.assign(Object.assign({}, 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 ? state.aggregateConfiguration : undefined;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["bypassSnaplockEnterpriseRetention"] = state ? state.bypassSnaplockEnterpriseRetention : undefined;
resourceInputs["copyTagsToBackups"] = state ? state.copyTagsToBackups : undefined;
resourceInputs["fileSystemId"] = state ? state.fileSystemId : undefined;
resourceInputs["finalBackupTags"] = state ? state.finalBackupTags : undefined;
resourceInputs["flexcacheEndpointType"] = state ? state.flexcacheEndpointType : undefined;
resourceInputs["junctionPath"] = state ? state.junctionPath : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["ontapVolumeType"] = state ? state.ontapVolumeType : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["securityStyle"] = state ? state.securityStyle : undefined;
resourceInputs["sizeInBytes"] = state ? state.sizeInBytes : undefined;
resourceInputs["sizeInMegabytes"] = state ? state.sizeInMegabytes : undefined;
resourceInputs["skipFinalBackup"] = state ? state.skipFinalBackup : undefined;
resourceInputs["snaplockConfiguration"] = state ? state.snaplockConfiguration : undefined;
resourceInputs["snapshotPolicy"] = state ? state.snapshotPolicy : undefined;
resourceInputs["storageEfficiencyEnabled"] = state ? state.storageEfficiencyEnabled : undefined;
resourceInputs["storageVirtualMachineId"] = state ? state.storageVirtualMachineId : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["tieringPolicy"] = state ? state.tieringPolicy : undefined;
resourceInputs["uuid"] = state ? state.uuid : undefined;
resourceInputs["volumeStyle"] = state ? state.volumeStyle : undefined;
resourceInputs["volumeType"] = state ? state.volumeType : undefined;
}
else {
const args = argsOrState;
if ((!args || args.storageVirtualMachineId === undefined) && !opts.urn) {
throw new Error("Missing required property 'storageVirtualMachineId'");
}
resourceInputs["aggregateConfiguration"] = args ? args.aggregateConfiguration : undefined;
resourceInputs["bypassSnaplockEnterpriseRetention"] = args ? args.bypassSnaplockEnterpriseRetention : undefined;
resourceInputs["copyTagsToBackups"] = args ? args.copyTagsToBackups : undefined;
resourceInputs["finalBackupTags"] = args ? args.finalBackupTags : undefined;
resourceInputs["junctionPath"] = args ? args.junctionPath : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["ontapVolumeType"] = args ? args.ontapVolumeType : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["securityStyle"] = args ? args.securityStyle : undefined;
resourceInputs["sizeInBytes"] = args ? args.sizeInBytes : undefined;
resourceInputs["sizeInMegabytes"] = args ? args.sizeInMegabytes : undefined;
resourceInputs["skipFinalBackup"] = args ? args.skipFinalBackup : undefined;
resourceInputs["snaplockConfiguration"] = args ? args.snaplockConfiguration : undefined;
resourceInputs["snapshotPolicy"] = args ? args.snapshotPolicy : undefined;
resourceInputs["storageEfficiencyEnabled"] = args ? args.storageEfficiencyEnabled : undefined;
resourceInputs["storageVirtualMachineId"] = args ? args.storageVirtualMachineId : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["tieringPolicy"] = args ? args.tieringPolicy : undefined;
resourceInputs["volumeStyle"] = args ? args.volumeStyle : undefined;
resourceInputs["volumeType"] = args ? args.volumeType : undefined;
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