UNPKG

@pulumi/aws

Version:

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

161 lines • 9.14 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.SmbFileShare = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Manages an AWS Storage Gateway SMB File Share. * * ## Example Usage * * ### Active Directory Authentication * * > **NOTE:** The gateway must have already joined the Active Directory domain prior to SMB file share creationE.g., via "SMB Settings" in the AWS Storage Gateway console or `smbActiveDirectorySettings` in the `aws.storagegateway.Gateway` resource. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.storagegateway.SmbFileShare("example", { * authentication: "ActiveDirectory", * gatewayArn: exampleAwsStoragegatewayGateway.arn, * locationArn: exampleAwsS3Bucket.arn, * roleArn: exampleAwsIamRole.arn, * }); * ``` * * ### Guest Authentication * * > **NOTE:** The gateway must have already had the SMB guest password set prior to SMB file share creationE.g., via "SMB Settings" in the AWS Storage Gateway console or `smbGuestPassword` in the `aws.storagegateway.Gateway` resource. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.storagegateway.SmbFileShare("example", { * authentication: "GuestAccess", * gatewayArn: exampleAwsStoragegatewayGateway.arn, * locationArn: exampleAwsS3Bucket.arn, * roleArn: exampleAwsIamRole.arn, * }); * ``` * * ## Import * * Using `pulumi import`, import `aws_storagegateway_smb_file_share` using the SMB File Share Amazon Resource Name (ARN). For example: * * ```sh * $ pulumi import aws:storagegateway/smbFileShare:SmbFileShare example arn:aws:storagegateway:us-east-1:123456789012:share/share-12345678 * ``` */ class SmbFileShare extends pulumi.CustomResource { /** * Get an existing SmbFileShare 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 SmbFileShare(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SmbFileShare. 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'] === SmbFileShare.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accessBasedEnumeration"] = state ? state.accessBasedEnumeration : undefined; resourceInputs["adminUserLists"] = state ? state.adminUserLists : undefined; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["auditDestinationArn"] = state ? state.auditDestinationArn : undefined; resourceInputs["authentication"] = state ? state.authentication : undefined; resourceInputs["bucketRegion"] = state ? state.bucketRegion : undefined; resourceInputs["cacheAttributes"] = state ? state.cacheAttributes : undefined; resourceInputs["caseSensitivity"] = state ? state.caseSensitivity : 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["invalidUserLists"] = state ? state.invalidUserLists : undefined; resourceInputs["kmsEncrypted"] = state ? state.kmsEncrypted : undefined; resourceInputs["kmsKeyArn"] = state ? state.kmsKeyArn : undefined; resourceInputs["locationArn"] = state ? state.locationArn : undefined; resourceInputs["notificationPolicy"] = state ? state.notificationPolicy : undefined; resourceInputs["objectAcl"] = state ? state.objectAcl : undefined; resourceInputs["oplocksEnabled"] = state ? state.oplocksEnabled : 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["smbAclEnabled"] = state ? state.smbAclEnabled : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["validUserLists"] = state ? state.validUserLists : undefined; resourceInputs["vpcEndpointDnsName"] = state ? state.vpcEndpointDnsName : undefined; } else { const args = argsOrState; 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["accessBasedEnumeration"] = args ? args.accessBasedEnumeration : undefined; resourceInputs["adminUserLists"] = args ? args.adminUserLists : undefined; resourceInputs["auditDestinationArn"] = args ? args.auditDestinationArn : undefined; resourceInputs["authentication"] = args ? args.authentication : undefined; resourceInputs["bucketRegion"] = args ? args.bucketRegion : undefined; resourceInputs["cacheAttributes"] = args ? args.cacheAttributes : undefined; resourceInputs["caseSensitivity"] = args ? args.caseSensitivity : 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["invalidUserLists"] = args ? args.invalidUserLists : undefined; resourceInputs["kmsEncrypted"] = args ? args.kmsEncrypted : undefined; resourceInputs["kmsKeyArn"] = args ? args.kmsKeyArn : undefined; resourceInputs["locationArn"] = args ? args.locationArn : undefined; resourceInputs["notificationPolicy"] = args ? args.notificationPolicy : undefined; resourceInputs["objectAcl"] = args ? args.objectAcl : undefined; resourceInputs["oplocksEnabled"] = args ? args.oplocksEnabled : 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["smbAclEnabled"] = args ? args.smbAclEnabled : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["validUserLists"] = args ? args.validUserLists : 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(SmbFileShare.__pulumiType, name, resourceInputs, opts); } } exports.SmbFileShare = SmbFileShare; /** @internal */ SmbFileShare.__pulumiType = 'aws:storagegateway/smbFileShare:SmbFileShare'; //# sourceMappingURL=smbFileShare.js.map