# CfnSMBFileShareProps

Struct · External

Properties for defining a `CfnSMBFileShare`.

Used as props by: [CfnSMBFileShare](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_storagegateway.CfnSMBFileShare.html)

- Source: Generated at build time
- Type last changed: v2.275.0 · 26 Oct 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_storagegateway as storagegateway } from 'aws-cdk-lib';
const cfnSMBFileShareProps: storagegateway.CfnSMBFileShareProps = {
  gatewayArn: 'gatewayArn',
  locationArn: 'locationArn',
  role: 'role',

  // the properties below are optional
  accessBasedEnumeration: false,
  adminUserList: ['adminUserList'],
  auditDestinationArn: 'auditDestinationArn',
  authentication: 'authentication',
  bucketRegion: 'bucketRegion',
  cacheAttributes: {
    cacheStaleTimeoutInSeconds: 123,
  },
  caseSensitivity: 'caseSensitivity',
  defaultStorageClass: 'defaultStorageClass',
  encryptionType: 'encryptionType',
  fileShareName: 'fileShareName',
  guessMimeTypeEnabled: false,
  invalidUserList: ['invalidUserList'],
  kmsEncrypted: false,
  kmsKey: 'kmsKey',
  notificationPolicy: 'notificationPolicy',
  objectAcl: 'objectAcl',
  oplocksEnabled: false,
  readOnly: false,
  requesterPays: false,
  smbaclEnabled: false,
  tags: [{
    key: 'key',
    value: 'value',
  }],
  validUserList: ['validUserList'],
  vpcEndpointDnsName: 'vpcEndpointDnsName',
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_storagegateway as storagegateway

cfn_smb_file_share_props = storagegateway.CfnSMBFileShareProps(
    gateway_arn="gatewayArn",
    location_arn="locationArn",
    role="role",

    # the properties below are optional
    access_based_enumeration=False,
    admin_user_list=["adminUserList"],
    audit_destination_arn="auditDestinationArn",
    authentication="authentication",
    bucket_region="bucketRegion",
    cache_attributes=storagegateway.CfnSMBFileShare.CacheAttributesProperty(
        cache_stale_timeout_in_seconds=123
    ),
    case_sensitivity="caseSensitivity",
    default_storage_class="defaultStorageClass",
    encryption_type="encryptionType",
    file_share_name="fileShareName",
    guess_mime_type_enabled=False,
    invalid_user_list=["invalidUserList"],
    kms_encrypted=False,
    kms_key="kmsKey",
    notification_policy="notificationPolicy",
    object_acl="objectAcl",
    oplocks_enabled=False,
    read_only=False,
    requester_pays=False,
    smbacl_enabled=False,
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    valid_user_list=["validUserList"],
    vpc_endpoint_dns_name="vpcEndpointDnsName"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.storagegateway.*;

CfnSMBFileShareProps cfnSMBFileShareProps = CfnSMBFileShareProps.builder()
        .gatewayArn("gatewayArn")
        .locationArn("locationArn")
        .role("role")

        // the properties below are optional
        .accessBasedEnumeration(false)
        .adminUserList(List.of("adminUserList"))
        .auditDestinationArn("auditDestinationArn")
        .authentication("authentication")
        .bucketRegion("bucketRegion")
        .cacheAttributes(CacheAttributesProperty.builder()
                .cacheStaleTimeoutInSeconds(123)
                .build())
        .caseSensitivity("caseSensitivity")
        .defaultStorageClass("defaultStorageClass")
        .encryptionType("encryptionType")
        .fileShareName("fileShareName")
        .guessMimeTypeEnabled(false)
        .invalidUserList(List.of("invalidUserList"))
        .kmsEncrypted(false)
        .kmsKey("kmsKey")
        .notificationPolicy("notificationPolicy")
        .objectAcl("objectAcl")
        .oplocksEnabled(false)
        .readOnly(false)
        .requesterPays(false)
        .smbaclEnabled(false)
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .validUserList(List.of("validUserList"))
        .vpcEndpointDnsName("vpcEndpointDnsName")
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.StorageGateway;

var cfnSMBFileShareProps = new CfnSMBFileShareProps {
    GatewayArn = "gatewayArn",
    LocationArn = "locationArn",
    Role = "role",

    // the properties below are optional
    AccessBasedEnumeration = false,
    AdminUserList = new [] { "adminUserList" },
    AuditDestinationArn = "auditDestinationArn",
    Authentication = "authentication",
    BucketRegion = "bucketRegion",
    CacheAttributes = new CacheAttributesProperty {
        CacheStaleTimeoutInSeconds = 123
    },
    CaseSensitivity = "caseSensitivity",
    DefaultStorageClass = "defaultStorageClass",
    EncryptionType = "encryptionType",
    FileShareName = "fileShareName",
    GuessMimeTypeEnabled = false,
    InvalidUserList = new [] { "invalidUserList" },
    KmsEncrypted = false,
    KmsKey = "kmsKey",
    NotificationPolicy = "notificationPolicy",
    ObjectAcl = "objectAcl",
    OplocksEnabled = false,
    ReadOnly = false,
    RequesterPays = false,
    SmbaclEnabled = false,
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    ValidUserList = new [] { "validUserList" },
    VpcEndpointDnsName = "vpcEndpointDnsName"
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnSMBFileShareProps := &CfnSMBFileShareProps{
	GatewayArn: jsii.String("gatewayArn"),
	LocationArn: jsii.String("locationArn"),
	Role: jsii.String("role"),

	// the properties below are optional
	AccessBasedEnumeration: jsii.Boolean(false),
	AdminUserList: []*string{
		jsii.String("adminUserList"),
	},
	AuditDestinationArn: jsii.String("auditDestinationArn"),
	Authentication: jsii.String("authentication"),
	BucketRegion: jsii.String("bucketRegion"),
	CacheAttributes: &CacheAttributesProperty{
		CacheStaleTimeoutInSeconds: jsii.Number(123),
	},
	CaseSensitivity: jsii.String("caseSensitivity"),
	DefaultStorageClass: jsii.String("defaultStorageClass"),
	EncryptionType: jsii.String("encryptionType"),
	FileShareName: jsii.String("fileShareName"),
	GuessMimeTypeEnabled: jsii.Boolean(false),
	InvalidUserList: []*string{
		jsii.String("invalidUserList"),
	},
	KmsEncrypted: jsii.Boolean(false),
	KmsKey: jsii.String("kmsKey"),
	NotificationPolicy: jsii.String("notificationPolicy"),
	ObjectAcl: jsii.String("objectAcl"),
	OplocksEnabled: jsii.Boolean(false),
	ReadOnly: jsii.Boolean(false),
	RequesterPays: jsii.Boolean(false),
	SmbaclEnabled: jsii.Boolean(false),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	ValidUserList: []*string{
		jsii.String("validUserList"),
	},
	VpcEndpointDnsName: jsii.String("vpcEndpointDnsName"),
}
```

## Properties

- `accessBasedEnumeration`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether clients see only the files and folders they may access.

- `adminUserList`: string[] — Users and groups granted administrative privileges on the SMB share.

- `auditDestinationArn`: string — The ARN of the CloudWatch log group that receives the share's audit logs.

  Removing this property from a template detaches audit logging: the update sends the empty string, which the service treats as the reset.

- `authentication`: string — The authentication the SMB share uses.

  The service accepts ActiveDirectory and GuestAccess; it is a length-bounded string in the API model rather than an enumeration.

- `bucketRegion`: string — The Region of the S3 bucket, required when the bucket is reached through a VPC endpoint.

- `cacheAttributes`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSMBFileShare.CacheAttributesProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_storagegateway.CfnSMBFileShare.CacheAttributesProperty.html) — Refresh cache information for the file share.

  Removing this property from a template leaves the share's current value: the service documents no value that resets it.

- `caseSensitivity`: string — Whether the SMB share is case sensitive or defers to the client.

- `defaultStorageClass`: string — The S3 storage class for new objects.

  The service accepts S3_STANDARD, S3_INTELLIGENT_TIERING, S3_STANDARD_IA and S3_ONEZONE_IA; it is a length-bounded string in the API model rather than an enumeration.

- `encryptionType`: string — The server-side encryption the gateway applies to objects it writes.

- `fileShareName`: string — The name of the file share, which defaults to the bucket name when omitted.

  Removing this property from a template leaves the share's current value: the service documents no value that resets it.

- `gatewayArn`: string (required) — The ARN of the S3 File Gateway that hosts the share.

- `guessMimeTypeEnabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether the gateway infers the MIME type of uploaded objects from their extension.

- `invalidUserList`: string[] — Users and groups denied access to the SMB share.

- `kmsEncrypted`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Deprecated by the service in favour of EncryptionType;

  true selects KMS encryption. Retained because it remains readable and settable.

- `kmsKey`: string — The KMS key used for encryption, when EncryptionType selects KMS.

  Removing this property from a template leaves the share's current value: the service documents no value that resets it.

- `locationArn`: string (required) — The ARN of the S3 bucket, or bucket prefix, the share exposes.

- `notificationPolicy`: string — The upload-notification settling period, as a JSON document.

- `objectAcl`: string — The canned S3 ACL applied to objects the gateway writes.

- `oplocksEnabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether the SMB share grants opportunistic locks.

  Removing this property from a template leaves the live value unchanged rather than restoring the created default, because that default depends on the gateway's software version -- opportunistic locking is enabled by default only on appliances at 1.19.0.0 or above -- and the version is not part of this resource. Set the value explicitly rather than relying on removal.

- `readOnly`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether clients may write to the share.

- `requesterPays`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether the bucket is a Requester Pays bucket.

- `role`: string (required) — The ARN of the IAM role the gateway assumes when it accesses the S3 location.

- `smbaclEnabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether the SMB share uses Windows ACLs rather than POSIX permissions.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Tags assigned to the file share.

- `validUserList`: string[] — Users and groups permitted to access the SMB share.

- `vpcEndpointDnsName`: string — The DNS name of the S3 VPC endpoint the gateway uses to reach the bucket.
