UNPKG

@pulumi/aws

Version:

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

161 lines • 8.04 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, { ...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?.accessBasedEnumeration; resourceInputs["adminUserLists"] = state?.adminUserLists; resourceInputs["arn"] = state?.arn; resourceInputs["auditDestinationArn"] = state?.auditDestinationArn; resourceInputs["authentication"] = state?.authentication; resourceInputs["bucketRegion"] = state?.bucketRegion; resourceInputs["cacheAttributes"] = state?.cacheAttributes; resourceInputs["caseSensitivity"] = state?.caseSensitivity; resourceInputs["defaultStorageClass"] = state?.defaultStorageClass; resourceInputs["fileShareName"] = state?.fileShareName; resourceInputs["fileshareId"] = state?.fileshareId; resourceInputs["gatewayArn"] = state?.gatewayArn; resourceInputs["guessMimeTypeEnabled"] = state?.guessMimeTypeEnabled; resourceInputs["invalidUserLists"] = state?.invalidUserLists; resourceInputs["kmsEncrypted"] = state?.kmsEncrypted; resourceInputs["kmsKeyArn"] = state?.kmsKeyArn; resourceInputs["locationArn"] = state?.locationArn; resourceInputs["notificationPolicy"] = state?.notificationPolicy; resourceInputs["objectAcl"] = state?.objectAcl; resourceInputs["oplocksEnabled"] = state?.oplocksEnabled; resourceInputs["path"] = state?.path; resourceInputs["readOnly"] = state?.readOnly; resourceInputs["region"] = state?.region; resourceInputs["requesterPays"] = state?.requesterPays; resourceInputs["roleArn"] = state?.roleArn; resourceInputs["smbAclEnabled"] = state?.smbAclEnabled; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["validUserLists"] = state?.validUserLists; resourceInputs["vpcEndpointDnsName"] = state?.vpcEndpointDnsName; } else { const args = argsOrState; 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["accessBasedEnumeration"] = args?.accessBasedEnumeration; resourceInputs["adminUserLists"] = args?.adminUserLists; resourceInputs["auditDestinationArn"] = args?.auditDestinationArn; resourceInputs["authentication"] = args?.authentication; resourceInputs["bucketRegion"] = args?.bucketRegion; resourceInputs["cacheAttributes"] = args?.cacheAttributes; resourceInputs["caseSensitivity"] = args?.caseSensitivity; resourceInputs["defaultStorageClass"] = args?.defaultStorageClass; resourceInputs["fileShareName"] = args?.fileShareName; resourceInputs["gatewayArn"] = args?.gatewayArn; resourceInputs["guessMimeTypeEnabled"] = args?.guessMimeTypeEnabled; resourceInputs["invalidUserLists"] = args?.invalidUserLists; resourceInputs["kmsEncrypted"] = args?.kmsEncrypted; resourceInputs["kmsKeyArn"] = args?.kmsKeyArn; resourceInputs["locationArn"] = args?.locationArn; resourceInputs["notificationPolicy"] = args?.notificationPolicy; resourceInputs["objectAcl"] = args?.objectAcl; resourceInputs["oplocksEnabled"] = args?.oplocksEnabled; resourceInputs["readOnly"] = args?.readOnly; resourceInputs["region"] = args?.region; resourceInputs["requesterPays"] = args?.requesterPays; resourceInputs["roleArn"] = args?.roleArn; resourceInputs["smbAclEnabled"] = args?.smbAclEnabled; resourceInputs["tags"] = args?.tags; resourceInputs["validUserLists"] = args?.validUserLists; 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(SmbFileShare.__pulumiType, name, resourceInputs, opts); } } exports.SmbFileShare = SmbFileShare; /** @internal */ SmbFileShare.__pulumiType = 'aws:storagegateway/smbFileShare:SmbFileShare'; //# sourceMappingURL=smbFileShare.js.map