@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
171 lines • 8.99 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.WindowsFileSystem = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages a FSx Windows File System. See the [FSx Windows Guide](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/what-is.html) for more information.
*
* > **NOTE:** Either the `activeDirectoryId` argument or `selfManagedActiveDirectory` configuration block must be specified.
*
* ## Example Usage
*
* ### Using AWS Directory Service
*
* Additional information for using AWS Directory Service with Windows File Systems can be found in the [FSx Windows Guide](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/fsx-aws-managed-ad.html).
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.fsx.WindowsFileSystem("example", {
* activeDirectoryId: exampleAwsDirectoryServiceDirectory.id,
* kmsKeyId: exampleAwsKmsKey.arn,
* storageCapacity: 32,
* subnetIds: [exampleAwsSubnet.id],
* throughputCapacity: 32,
* });
* ```
*
* ### Using a Self-Managed Microsoft Active Directory
*
* Additional information for using AWS Directory Service with Windows File Systems can be found in the [FSx Windows Guide](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/self-managed-AD.html).
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.fsx.WindowsFileSystem("example", {
* kmsKeyId: exampleAwsKmsKey.arn,
* storageCapacity: 32,
* subnetIds: [exampleAwsSubnet.id],
* throughputCapacity: 32,
* selfManagedActiveDirectory: {
* dnsIps: [
* "10.0.0.111",
* "10.0.0.222",
* ],
* domainName: "corp.example.com",
* password: "avoid-plaintext-passwords",
* username: "Admin",
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import FSx File Systems using the `id`. For example:
*
* ```sh
* $ pulumi import aws:fsx/windowsFileSystem:WindowsFileSystem example fs-543ab12b1ca672f33
* ```
* Certain resource arguments, like `security_group_ids` and the `self_managed_active_directory` configuation block `password`, do not have a FSx API method for reading the information after creation. If these arguments are 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 WindowsFileSystem extends pulumi.CustomResource {
/**
* Get an existing WindowsFileSystem 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 WindowsFileSystem(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of WindowsFileSystem. 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'] === WindowsFileSystem.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["activeDirectoryId"] = state?.activeDirectoryId;
resourceInputs["aliases"] = state?.aliases;
resourceInputs["arn"] = state?.arn;
resourceInputs["auditLogConfiguration"] = state?.auditLogConfiguration;
resourceInputs["automaticBackupRetentionDays"] = state?.automaticBackupRetentionDays;
resourceInputs["backupId"] = state?.backupId;
resourceInputs["copyTagsToBackups"] = state?.copyTagsToBackups;
resourceInputs["dailyAutomaticBackupStartTime"] = state?.dailyAutomaticBackupStartTime;
resourceInputs["deploymentType"] = state?.deploymentType;
resourceInputs["diskIopsConfiguration"] = state?.diskIopsConfiguration;
resourceInputs["dnsName"] = state?.dnsName;
resourceInputs["finalBackupTags"] = state?.finalBackupTags;
resourceInputs["kmsKeyId"] = state?.kmsKeyId;
resourceInputs["networkInterfaceIds"] = state?.networkInterfaceIds;
resourceInputs["ownerId"] = state?.ownerId;
resourceInputs["preferredFileServerIp"] = state?.preferredFileServerIp;
resourceInputs["preferredSubnetId"] = state?.preferredSubnetId;
resourceInputs["region"] = state?.region;
resourceInputs["remoteAdministrationEndpoint"] = state?.remoteAdministrationEndpoint;
resourceInputs["securityGroupIds"] = state?.securityGroupIds;
resourceInputs["selfManagedActiveDirectory"] = state?.selfManagedActiveDirectory;
resourceInputs["skipFinalBackup"] = state?.skipFinalBackup;
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["vpcId"] = state?.vpcId;
resourceInputs["weeklyMaintenanceStartTime"] = state?.weeklyMaintenanceStartTime;
}
else {
const args = argsOrState;
if (args?.subnetIds === undefined && !opts.urn) {
throw new Error("Missing required property 'subnetIds'");
}
if (args?.throughputCapacity === undefined && !opts.urn) {
throw new Error("Missing required property 'throughputCapacity'");
}
resourceInputs["activeDirectoryId"] = args?.activeDirectoryId;
resourceInputs["aliases"] = args?.aliases;
resourceInputs["auditLogConfiguration"] = args?.auditLogConfiguration;
resourceInputs["automaticBackupRetentionDays"] = args?.automaticBackupRetentionDays;
resourceInputs["backupId"] = args?.backupId;
resourceInputs["copyTagsToBackups"] = args?.copyTagsToBackups;
resourceInputs["dailyAutomaticBackupStartTime"] = args?.dailyAutomaticBackupStartTime;
resourceInputs["deploymentType"] = args?.deploymentType;
resourceInputs["diskIopsConfiguration"] = args?.diskIopsConfiguration;
resourceInputs["finalBackupTags"] = args?.finalBackupTags;
resourceInputs["kmsKeyId"] = args?.kmsKeyId;
resourceInputs["preferredSubnetId"] = args?.preferredSubnetId;
resourceInputs["region"] = args?.region;
resourceInputs["securityGroupIds"] = args?.securityGroupIds;
resourceInputs["selfManagedActiveDirectory"] = args?.selfManagedActiveDirectory;
resourceInputs["skipFinalBackup"] = args?.skipFinalBackup;
resourceInputs["storageCapacity"] = args?.storageCapacity;
resourceInputs["storageType"] = args?.storageType;
resourceInputs["subnetIds"] = args?.subnetIds;
resourceInputs["tags"] = args?.tags;
resourceInputs["throughputCapacity"] = args?.throughputCapacity;
resourceInputs["weeklyMaintenanceStartTime"] = args?.weeklyMaintenanceStartTime;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["dnsName"] = undefined /*out*/;
resourceInputs["networkInterfaceIds"] = undefined /*out*/;
resourceInputs["ownerId"] = undefined /*out*/;
resourceInputs["preferredFileServerIp"] = undefined /*out*/;
resourceInputs["remoteAdministrationEndpoint"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
resourceInputs["vpcId"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(WindowsFileSystem.__pulumiType, name, resourceInputs, opts);
}
}
exports.WindowsFileSystem = WindowsFileSystem;
/** @internal */
WindowsFileSystem.__pulumiType = 'aws:fsx/windowsFileSystem:WindowsFileSystem';
//# sourceMappingURL=windowsFileSystem.js.map