UNPKG

@pulumi/aws

Version:

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

134 lines 6.51 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.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, { ...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?.arn; resourceInputs["auditDestinationArn"] = state?.auditDestinationArn; resourceInputs["bucketRegion"] = state?.bucketRegion; resourceInputs["cacheAttributes"] = state?.cacheAttributes; resourceInputs["clientLists"] = state?.clientLists; resourceInputs["defaultStorageClass"] = state?.defaultStorageClass; resourceInputs["fileShareName"] = state?.fileShareName; resourceInputs["fileshareId"] = state?.fileshareId; resourceInputs["gatewayArn"] = state?.gatewayArn; resourceInputs["guessMimeTypeEnabled"] = state?.guessMimeTypeEnabled; resourceInputs["kmsEncrypted"] = state?.kmsEncrypted; resourceInputs["kmsKeyArn"] = state?.kmsKeyArn; resourceInputs["locationArn"] = state?.locationArn; resourceInputs["nfsFileShareDefaults"] = state?.nfsFileShareDefaults; resourceInputs["notificationPolicy"] = state?.notificationPolicy; resourceInputs["objectAcl"] = state?.objectAcl; resourceInputs["path"] = state?.path; resourceInputs["readOnly"] = state?.readOnly; resourceInputs["region"] = state?.region; resourceInputs["requesterPays"] = state?.requesterPays; resourceInputs["roleArn"] = state?.roleArn; resourceInputs["squash"] = state?.squash; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["vpcEndpointDnsName"] = state?.vpcEndpointDnsName; } else { const args = argsOrState; if (args?.clientLists === undefined && !opts.urn) { throw new Error("Missing required property 'clientLists'"); } if (args?.gatewayArn === undefined && !opts.urn) { throw new Error("Missing required property 'gatewayArn'"); } if (args?.locationArn === undefined && !opts.urn) { throw new Error("Missing required property 'locationArn'"); } if (args?.roleArn === undefined && !opts.urn) { throw new Error("Missing required property 'roleArn'"); } resourceInputs["auditDestinationArn"] = args?.auditDestinationArn; resourceInputs["bucketRegion"] = args?.bucketRegion; resourceInputs["cacheAttributes"] = args?.cacheAttributes; resourceInputs["clientLists"] = args?.clientLists; resourceInputs["defaultStorageClass"] = args?.defaultStorageClass; resourceInputs["fileShareName"] = args?.fileShareName; resourceInputs["gatewayArn"] = args?.gatewayArn; resourceInputs["guessMimeTypeEnabled"] = args?.guessMimeTypeEnabled; resourceInputs["kmsEncrypted"] = args?.kmsEncrypted; resourceInputs["kmsKeyArn"] = args?.kmsKeyArn; resourceInputs["locationArn"] = args?.locationArn; resourceInputs["nfsFileShareDefaults"] = args?.nfsFileShareDefaults; resourceInputs["notificationPolicy"] = args?.notificationPolicy; resourceInputs["objectAcl"] = args?.objectAcl; resourceInputs["readOnly"] = args?.readOnly; resourceInputs["region"] = args?.region; resourceInputs["requesterPays"] = args?.requesterPays; resourceInputs["roleArn"] = args?.roleArn; resourceInputs["squash"] = args?.squash; resourceInputs["tags"] = args?.tags; resourceInputs["vpcEndpointDnsName"] = args?.vpcEndpointDnsName; 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