SmbFileShare class

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.

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,
});
import pulumi
import pulumi_aws as aws

example = aws.storagegateway.SmbFileShare("example",
    authentication="ActiveDirectory",
    gateway_arn=example_aws_storagegateway_gateway["arn"],
    location_arn=example_aws_s3_bucket["arn"],
    role_arn=example_aws_iam_role["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.StorageGateway.SmbFileShare("example", new()
    {
        Authentication = "ActiveDirectory",
        GatewayArn = exampleAwsStoragegatewayGateway.Arn,
        LocationArn = exampleAwsS3Bucket.Arn,
        RoleArn = exampleAwsIamRole.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/storagegateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := storagegateway.NewSmbFileShare(ctx, "example", &storagegateway.SmbFileShareArgs{
			Authentication: pulumi.String("ActiveDirectory"),
			GatewayArn:     pulumi.Any(exampleAwsStoragegatewayGateway.Arn),
			LocationArn:    pulumi.Any(exampleAwsS3Bucket.Arn),
			RoleArn:        pulumi.Any(exampleAwsIamRole.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_storagegateway_smbfileshare" "example" {
  authentication = "ActiveDirectory"
  gateway_arn    = exampleAwsStoragegatewayGateway.arn
  location_arn   = exampleAwsS3Bucket.arn
  role_arn       = exampleAwsIamRole.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.SmbFileShare;
import com.pulumi.aws.storagegateway.SmbFileShareArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new SmbFileShare("example", SmbFileShareArgs.builder()
            .authentication("ActiveDirectory")
            .gatewayArn(exampleAwsStoragegatewayGateway.arn())
            .locationArn(exampleAwsS3Bucket.arn())
            .roleArn(exampleAwsIamRole.arn())
            .build());

    }
}
resources:
  example:
    type: aws:storagegateway:SmbFileShare
    properties:
      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.

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 pulumi
import pulumi_aws as aws

example = aws.storagegateway.SmbFileShare("example",
    authentication="GuestAccess",
    gateway_arn=example_aws_storagegateway_gateway["arn"],
    location_arn=example_aws_s3_bucket["arn"],
    role_arn=example_aws_iam_role["arn"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = new Aws.StorageGateway.SmbFileShare("example", new()
    {
        Authentication = "GuestAccess",
        GatewayArn = exampleAwsStoragegatewayGateway.Arn,
        LocationArn = exampleAwsS3Bucket.Arn,
        RoleArn = exampleAwsIamRole.Arn,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/storagegateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := storagegateway.NewSmbFileShare(ctx, "example", &storagegateway.SmbFileShareArgs{
			Authentication: pulumi.String("GuestAccess"),
			GatewayArn:     pulumi.Any(exampleAwsStoragegatewayGateway.Arn),
			LocationArn:    pulumi.Any(exampleAwsS3Bucket.Arn),
			RoleArn:        pulumi.Any(exampleAwsIamRole.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_storagegateway_smbfileshare" "example" {
  authentication = "GuestAccess"
  gateway_arn    = exampleAwsStoragegatewayGateway.arn
  location_arn   = exampleAwsS3Bucket.arn
  role_arn       = exampleAwsIamRole.arn
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.storagegateway.SmbFileShare;
import com.pulumi.aws.storagegateway.SmbFileShareArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new SmbFileShare("example", SmbFileShareArgs.builder()
            .authentication("GuestAccess")
            .gatewayArn(exampleAwsStoragegatewayGateway.arn())
            .locationArn(exampleAwsS3Bucket.arn())
            .roleArn(exampleAwsIamRole.arn())
            .build());

    }
}
resources:
  example:
    type: aws:storagegateway:SmbFileShare
    properties:
      authentication: GuestAccess
      gatewayArn: ${exampleAwsStoragegatewayGateway.arn}
      locationArn: ${exampleAwsS3Bucket.arn}
      roleArn: ${exampleAwsIamRole.arn}

Import

Using pulumi import, import aws.storagegateway.SmbFileShare using the SMB File Share ARN. For example:

$ pulumi import aws:storagegateway/smbFileShare:SmbFileShare example arn:aws:storagegateway:us-east-1:123456789012:share/share-12345678

Constructors

SmbFileShare(String name, {SmbFileShareArgs? args, CustomResourceOptions? options})
Creates a new SmbFileShare. name The Pulumi resource name. args Arguments used to configure this SmbFileShare. The set of arguments for SmbFileShare. options Resource options controlling this resource's behavior.
SmbFileShare.reference(String urn)
Creates a typed reference to an existing SmbFileShare resource.

Properties

accessBasedEnumeration ↔ Output<bool?>
The files and folders on this share will only be visible to users with read access. Default value is false.
latefinal
adminUserLists ↔ Output<List<String>?>
A list of users in the Active Directory that have admin access to the file share. Only valid if authentication is set to ActiveDirectory.
latefinal
arn ↔ Output<String>
ARN of the SMB File Share.
latefinal
auditDestinationArn ↔ Output<String?>
ARN of the CloudWatch Log Group used for the audit logs.
latefinal
authentication ↔ Output<String?>
The authentication method that users use to access the file share. Defaults to ActiveDirectory. Valid values: ActiveDirectory, GuestAccess.
latefinal
bucketRegion ↔ Output<String?>
The region of the S3 buck used by the file share. Required when specifying a vpcEndpointDnsName.
latefinal
cacheAttributes ↔ Output<SmbFileShareCacheAttributes?>
Refresh cache information. see cacheAttributes Block for more details.
latefinal
caseSensitivity ↔ Output<String?>
The case of an object name in an Amazon S3 bucket. For ClientSpecified, the client determines the case sensitivity. For CaseSensitive, the gateway determines the case sensitivity. The default value is ClientSpecified.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
defaultStorageClass ↔ Output<String?>
The default storage class for objects put into an Amazon S3 bucket by the file gateway. Defaults to S3_STANDARD.
latefinal
fileshareId ↔ Output<String>
ID of the SMB File Share.
latefinal
fileShareName ↔ Output<String>
The name of the file share. Must be set if an S3 prefix name is set in locationArn.
latefinal
gatewayArn ↔ Output<String>
ARN of the file gateway.
latefinal
guessMimeTypeEnabled ↔ Output<bool?>
Boolean value that enables guessing of the MIME type for uploaded objects based on file extensions. Defaults to true.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
invalidUserLists ↔ Output<List<String>?>
A list of users in the Active Directory that are not allowed to access the file share. Only valid if authentication is set to ActiveDirectory.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
kmsEncrypted ↔ Output<bool?>
Boolean value if true to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon S3. Defaults to false.
latefinal
kmsKeyArn ↔ Output<String?>
ARN for KMS key used for Amazon S3 server side encryption. This value can only be set when kmsEncrypted is true.
latefinal
locationArn ↔ Output<String>
The ARN of the backed storage used for storing file data.
latefinal
notificationPolicy ↔ Output<String?>
The notification policy of the file share. For more information see the AWS Documentation. Default value is {}.
latefinal
objectAcl ↔ Output<String?>
Access Control List permission for S3 objects. Defaults to private.
latefinal
oplocksEnabled ↔ Output<bool>
Boolean to indicate Opportunistic lock (oplock) status. Defaults to true.
latefinal
path ↔ Output<String>
File share path used by the NFS client to identify the mount point.
latefinal
readOnly ↔ Output<bool?>
Boolean to indicate write status of file share. File share does not accept writes if true. Defaults to false.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
requesterPays ↔ Output<bool?>
Boolean who pays the cost of the request and the data download from the Amazon S3 bucket. Set this value to true if you want the requester to pay instead of the bucket owner. Defaults to false.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
roleArn ↔ Output<String>
The ARN of the AWS Identity and Access Management (IAM) role that a file gateway assumes when it accesses the underlying storage.
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
smbAclEnabled ↔ Output<bool?>
Set this value to true to enable ACL (access control list) on the SMB fileshare. Set it to false to map file and directory permissions to the POSIX permissions. This setting applies only to ActiveDirectory authentication type.
latefinal
tags ↔ Output<Map<String, String>?>
Key-value map of resource tags. .If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
validUserLists ↔ Output<List<String>?>
A list of users in the Active Directory that are allowed to access the file share. If you need to specify an Active directory group, add '@' before the name of the group. It will be set on Allowed group in AWS console. Only valid if authentication is set to ActiveDirectory.
latefinal
vpcEndpointDnsName ↔ Output<String?>
The DNS name of the VPC endpoint for S3 private link.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {SmbFileShareState? state, CustomResourceOptions? options}) → SmbFileShare
Gets an existing SmbFileShare resource's state with the given name and id.