Skip to main content

smb_file_shares

Creates, updates, deletes, gets or lists a smb_file_shares resource.

Overview

Namesmb_file_shares
TypeResource
Idaws.storagegateway.smb_file_shares

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
smb_file_share_info_listarrayAn array containing a description for each requested file share.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_smb_file_sharesselectregionGets a description for one or more Server Message Block (SMB) file shares from a S3 File Gateway. This operation is only supported for S3 File Gateways.
create_smb_file_shareinsertregion, ClientToken, GatewayARN, Role, LocationARNCreates a Server Message Block (SMB) file share on an existing S3 File Gateway. In Storage Gateway, a file share is a file system mount point backed by Amazon S3 cloud storage. Storage Gateway exposes file shares using an SMB interface. This operation is only supported for S3 File Gateways. S3 File Gateways require Security Token Service (Amazon Web Services STS) to be activated to enable you to create a file share. Make sure that Amazon Web Services STS is activated in the Amazon Web Services Region you are creating your S3 File Gateway in. If Amazon Web Services STS is not activated in this Amazon Web Services Region, activate it. For information about how to activate Amazon Web Services STS, see Activating and deactivating Amazon Web Services STS in an Amazon Web Services Region in the Identity and Access Management User Guide. File gateways don't support creating hard or symbolic links on a file share.
update_smb_file_share_visibilityupdateregion, GatewayARN, FileSharesVisibleControls whether the shares on an S3 File Gateway are visible in a net view or browse list. The operation is only supported for S3 File Gateways.
update_smb_file_shareupdateregion, FileShareARNUpdates a Server Message Block (SMB) file share. This operation is only supported for S3 File Gateways. To leave a file share field unchanged, set the corresponding input field to null. File gateways require Security Token Service (Amazon Web Services STS) to be activated to enable you to create a file share. Make sure that Amazon Web Services STS is activated in the Amazon Web Services Region you are creating your file gateway in. If Amazon Web Services STS is not activated in this Amazon Web Services Region, activate it. For information about how to activate Amazon Web Services STS, see Activating and deactivating Amazon Web Services STS in an Amazon Web Services Region in the Identity and Access Management User Guide. File gateways don't support creating hard or symbolic links on a file share.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets a description for one or more Server Message Block (SMB) file shares from a S3 File Gateway. This operation is only supported for S3 File Gateways.

SELECT
smb_file_share_info_list
FROM aws.storagegateway.smb_file_shares
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a Server Message Block (SMB) file share on an existing S3 File Gateway. In Storage Gateway, a file share is a file system mount point backed by Amazon S3 cloud storage. Storage Gateway exposes file shares using an SMB interface. This operation is only supported for S3 File Gateways. S3 File Gateways require Security Token Service (Amazon Web Services STS) to be activated to enable you to create a file share. Make sure that Amazon Web Services STS is activated in the Amazon Web Services Region you are creating your S3 File Gateway in. If Amazon Web Services STS is not activated in this Amazon Web Services Region, activate it. For information about how to activate Amazon Web Services STS, see Activating and deactivating Amazon Web Services STS in an Amazon Web Services Region in the Identity and Access Management User Guide. File gateways don't support creating hard or symbolic links on a file share.

INSERT INTO aws.storagegateway.smb_file_shares (
ClientToken,
GatewayARN,
EncryptionType,
KMSEncrypted,
KMSKey,
Role,
LocationARN,
DefaultStorageClass,
ObjectACL,
ReadOnly,
GuessMIMETypeEnabled,
RequesterPays,
SMBACLEnabled,
AccessBasedEnumeration,
AdminUserList,
ValidUserList,
InvalidUserList,
AuditDestinationARN,
Authentication,
CaseSensitivity,
Tags,
FileShareName,
CacheAttributes,
NotificationPolicy,
VPCEndpointDNSName,
BucketRegion,
OplocksEnabled,
region
)
SELECT
'{{ ClientToken }}' /* required */,
'{{ GatewayARN }}' /* required */,
'{{ EncryptionType }}',
{{ KMSEncrypted }},
'{{ KMSKey }}',
'{{ Role }}' /* required */,
'{{ LocationARN }}' /* required */,
'{{ DefaultStorageClass }}',
'{{ ObjectACL }}',
{{ ReadOnly }},
{{ GuessMIMETypeEnabled }},
{{ RequesterPays }},
{{ SMBACLEnabled }},
{{ AccessBasedEnumeration }},
'{{ AdminUserList }}',
'{{ ValidUserList }}',
'{{ InvalidUserList }}',
'{{ AuditDestinationARN }}',
'{{ Authentication }}',
'{{ CaseSensitivity }}',
'{{ Tags }}',
'{{ FileShareName }}',
'{{ CacheAttributes }}',
'{{ NotificationPolicy }}',
'{{ VPCEndpointDNSName }}',
'{{ BucketRegion }}',
{{ OplocksEnabled }},
'{{ region }}'
RETURNING
file_share_arn
;

UPDATE examples

Controls whether the shares on an S3 File Gateway are visible in a net view or browse list. The operation is only supported for S3 File Gateways.

UPDATE aws.storagegateway.smb_file_shares
SET
GatewayARN = '{{ GatewayARN }}',
FileSharesVisible = {{ FileSharesVisible }}
WHERE
region = '{{ region }}' --required
AND GatewayARN = '{{ GatewayARN }}' --required
AND FileSharesVisible = {{ FileSharesVisible }} --required
RETURNING
gateway_arn;