@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
134 lines • 7.43 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.NfsFileShare = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Manages an AWS Storage Gateway NFS File Share.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.storagegateway.NfsFileShare("example", {
* clientLists: ["0.0.0.0/0"],
* gatewayArn: exampleAwsStoragegatewayGateway.arn,
* locationArn: exampleAwsS3Bucket.arn,
* roleArn: exampleAwsIamRole.arn,
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_storagegateway_nfs_file_share` using the NFS File Share Amazon Resource Name (ARN). For example:
*
* ```sh
* $ pulumi import aws:storagegateway/nfsFileShare:NfsFileShare example arn:aws:storagegateway:us-east-1:123456789012:share/share-12345678
* ```
*/
class NfsFileShare extends pulumi.CustomResource {
/**
* Get an existing NfsFileShare 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 NfsFileShare(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of NfsFileShare. 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'] === NfsFileShare.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["auditDestinationArn"] = state ? state.auditDestinationArn : undefined;
resourceInputs["bucketRegion"] = state ? state.bucketRegion : undefined;
resourceInputs["cacheAttributes"] = state ? state.cacheAttributes : undefined;
resourceInputs["clientLists"] = state ? state.clientLists : undefined;
resourceInputs["defaultStorageClass"] = state ? state.defaultStorageClass : undefined;
resourceInputs["fileShareName"] = state ? state.fileShareName : undefined;
resourceInputs["fileshareId"] = state ? state.fileshareId : undefined;
resourceInputs["gatewayArn"] = state ? state.gatewayArn : undefined;
resourceInputs["guessMimeTypeEnabled"] = state ? state.guessMimeTypeEnabled : undefined;
resourceInputs["kmsEncrypted"] = state ? state.kmsEncrypted : undefined;
resourceInputs["kmsKeyArn"] = state ? state.kmsKeyArn : undefined;
resourceInputs["locationArn"] = state ? state.locationArn : undefined;
resourceInputs["nfsFileShareDefaults"] = state ? state.nfsFileShareDefaults : undefined;
resourceInputs["notificationPolicy"] = state ? state.notificationPolicy : undefined;
resourceInputs["objectAcl"] = state ? state.objectAcl : undefined;
resourceInputs["path"] = state ? state.path : undefined;
resourceInputs["readOnly"] = state ? state.readOnly : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["requesterPays"] = state ? state.requesterPays : undefined;
resourceInputs["roleArn"] = state ? state.roleArn : undefined;
resourceInputs["squash"] = state ? state.squash : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["tagsAll"] = state ? state.tagsAll : undefined;
resourceInputs["vpcEndpointDnsName"] = state ? state.vpcEndpointDnsName : undefined;
}
else {
const args = argsOrState;
if ((!args || args.clientLists === undefined) && !opts.urn) {
throw new Error("Missing required property 'clientLists'");
}
if ((!args || args.gatewayArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'gatewayArn'");
}
if ((!args || args.locationArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'locationArn'");
}
if ((!args || args.roleArn === undefined) && !opts.urn) {
throw new Error("Missing required property 'roleArn'");
}
resourceInputs["auditDestinationArn"] = args ? args.auditDestinationArn : undefined;
resourceInputs["bucketRegion"] = args ? args.bucketRegion : undefined;
resourceInputs["cacheAttributes"] = args ? args.cacheAttributes : undefined;
resourceInputs["clientLists"] = args ? args.clientLists : undefined;
resourceInputs["defaultStorageClass"] = args ? args.defaultStorageClass : undefined;
resourceInputs["fileShareName"] = args ? args.fileShareName : undefined;
resourceInputs["gatewayArn"] = args ? args.gatewayArn : undefined;
resourceInputs["guessMimeTypeEnabled"] = args ? args.guessMimeTypeEnabled : undefined;
resourceInputs["kmsEncrypted"] = args ? args.kmsEncrypted : undefined;
resourceInputs["kmsKeyArn"] = args ? args.kmsKeyArn : undefined;
resourceInputs["locationArn"] = args ? args.locationArn : undefined;
resourceInputs["nfsFileShareDefaults"] = args ? args.nfsFileShareDefaults : undefined;
resourceInputs["notificationPolicy"] = args ? args.notificationPolicy : undefined;
resourceInputs["objectAcl"] = args ? args.objectAcl : undefined;
resourceInputs["readOnly"] = args ? args.readOnly : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["requesterPays"] = args ? args.requesterPays : undefined;
resourceInputs["roleArn"] = args ? args.roleArn : undefined;
resourceInputs["squash"] = args ? args.squash : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["vpcEndpointDnsName"] = args ? args.vpcEndpointDnsName : undefined;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["fileshareId"] = undefined /*out*/;
resourceInputs["path"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(NfsFileShare.__pulumiType, name, resourceInputs, opts);
}
}
exports.NfsFileShare = NfsFileShare;
/** @internal */
NfsFileShare.__pulumiType = 'aws:storagegateway/nfsFileShare:NfsFileShare';
//# sourceMappingURL=nfsFileShare.js.map