UNPKG

@pulumi/aws

Version:

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

189 lines • 8.78 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.OntapFileSystem = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an Amazon FSx for NetApp ONTAP file system. * See the [FSx ONTAP User Guide](https://docs.aws.amazon.com/fsx/latest/ONTAPGuide/what-is-fsx-ontap.html) for more information. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.fsx.OntapFileSystem("test", { * storageCapacity: 1024, * subnetIds: [ * test1.id, * test2.id, * ], * deploymentType: "MULTI_AZ_1", * throughputCapacity: 512, * preferredSubnetId: test1.id, * }); * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const testhapairs = new aws.fsx.OntapFileSystem("testhapairs", { * storageCapacity: 2048, * subnetIds: [test1.id], * deploymentType: "SINGLE_AZ_1", * haPairs: 2, * throughputCapacityPerHaPair: 128, * preferredSubnetId: test1.id, * }); * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const testsingleazgen2 = new aws.fsx.OntapFileSystem("testsingleazgen2", { * storageCapacity: 4096, * subnetIds: [test1.id], * deploymentType: "SINGLE_AZ_2", * haPairs: 4, * throughputCapacityPerHaPair: 384, * preferredSubnetId: test1.id, * }); * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const testmultiazgen2 = new aws.fsx.OntapFileSystem("testmultiazgen2", { * storageCapacity: 1024, * subnetIds: [ * test1.id, * test2.id, * ], * deploymentType: "MULTI_AZ_2", * haPairs: 1, * throughputCapacityPerHaPair: 384, * preferredSubnetId: test1.id, * }); * ``` * * ## Import * * Using `pulumi import`, import FSx File Systems using the `id`. For example: * * ```sh * $ pulumi import aws:fsx/ontapFileSystem:OntapFileSystem example fs-543ab12b1ca672f33 * ``` * Certain resource arguments, like `security_group_ids`, do not have a FSx API method for reading the information after creation. If the argument is set in the Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use `ignore_changes` to hide the difference. For example: */ class OntapFileSystem extends pulumi.CustomResource { /** * Get an existing OntapFileSystem 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 OntapFileSystem(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of OntapFileSystem. 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'] === OntapFileSystem.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["automaticBackupRetentionDays"] = state?.automaticBackupRetentionDays; resourceInputs["dailyAutomaticBackupStartTime"] = state?.dailyAutomaticBackupStartTime; resourceInputs["deploymentType"] = state?.deploymentType; resourceInputs["diskIopsConfiguration"] = state?.diskIopsConfiguration; resourceInputs["dnsName"] = state?.dnsName; resourceInputs["endpointIpAddressRange"] = state?.endpointIpAddressRange; resourceInputs["endpoints"] = state?.endpoints; resourceInputs["fsxAdminPassword"] = state?.fsxAdminPassword; resourceInputs["haPairs"] = state?.haPairs; resourceInputs["kmsKeyId"] = state?.kmsKeyId; resourceInputs["networkInterfaceIds"] = state?.networkInterfaceIds; resourceInputs["ownerId"] = state?.ownerId; resourceInputs["preferredSubnetId"] = state?.preferredSubnetId; resourceInputs["region"] = state?.region; resourceInputs["routeTableIds"] = state?.routeTableIds; resourceInputs["securityGroupIds"] = state?.securityGroupIds; resourceInputs["storageCapacity"] = state?.storageCapacity; resourceInputs["storageType"] = state?.storageType; resourceInputs["subnetIds"] = state?.subnetIds; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["throughputCapacity"] = state?.throughputCapacity; resourceInputs["throughputCapacityPerHaPair"] = state?.throughputCapacityPerHaPair; resourceInputs["vpcId"] = state?.vpcId; resourceInputs["weeklyMaintenanceStartTime"] = state?.weeklyMaintenanceStartTime; } else { const args = argsOrState; if (args?.deploymentType === undefined && !opts.urn) { throw new Error("Missing required property 'deploymentType'"); } if (args?.preferredSubnetId === undefined && !opts.urn) { throw new Error("Missing required property 'preferredSubnetId'"); } if (args?.storageCapacity === undefined && !opts.urn) { throw new Error("Missing required property 'storageCapacity'"); } if (args?.subnetIds === undefined && !opts.urn) { throw new Error("Missing required property 'subnetIds'"); } resourceInputs["automaticBackupRetentionDays"] = args?.automaticBackupRetentionDays; resourceInputs["dailyAutomaticBackupStartTime"] = args?.dailyAutomaticBackupStartTime; resourceInputs["deploymentType"] = args?.deploymentType; resourceInputs["diskIopsConfiguration"] = args?.diskIopsConfiguration; resourceInputs["endpointIpAddressRange"] = args?.endpointIpAddressRange; resourceInputs["fsxAdminPassword"] = args?.fsxAdminPassword ? pulumi.secret(args.fsxAdminPassword) : undefined; resourceInputs["haPairs"] = args?.haPairs; resourceInputs["kmsKeyId"] = args?.kmsKeyId; resourceInputs["preferredSubnetId"] = args?.preferredSubnetId; resourceInputs["region"] = args?.region; resourceInputs["routeTableIds"] = args?.routeTableIds; resourceInputs["securityGroupIds"] = args?.securityGroupIds; resourceInputs["storageCapacity"] = args?.storageCapacity; resourceInputs["storageType"] = args?.storageType; resourceInputs["subnetIds"] = args?.subnetIds; resourceInputs["tags"] = args?.tags; resourceInputs["throughputCapacity"] = args?.throughputCapacity; resourceInputs["throughputCapacityPerHaPair"] = args?.throughputCapacityPerHaPair; resourceInputs["weeklyMaintenanceStartTime"] = args?.weeklyMaintenanceStartTime; resourceInputs["arn"] = undefined /*out*/; resourceInputs["dnsName"] = undefined /*out*/; resourceInputs["endpoints"] = undefined /*out*/; resourceInputs["networkInterfaceIds"] = undefined /*out*/; resourceInputs["ownerId"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["vpcId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["fsxAdminPassword"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(OntapFileSystem.__pulumiType, name, resourceInputs, opts); } } exports.OntapFileSystem = OntapFileSystem; /** @internal */ OntapFileSystem.__pulumiType = 'aws:fsx/ontapFileSystem:OntapFileSystem'; //# sourceMappingURL=ontapFileSystem.js.map