Skip to main content

location_smbs

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

Overview

Namelocation_smbs
TypeResource
Idaws.datasync.location_smbs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
agent_arnsarrayThe ARNs of the DataSync agents that can connect with your SMB file server.
authentication_typestringThe authentication protocol that DataSync uses to connect to your SMB file server. (NTLM, KERBEROS)
cmk_secret_configobjectDescribes configuration information for a DataSync-managed secret, such as a Password or KerberosKeytab that DataSync uses to access a specific storage location, with a customer-managed KMS key.
creation_timestring (date-time)The time that the SMB location was created.
custom_secret_configobjectDescribes configuration information for a customer-managed secret, such as a Password or KerberosKeytab that DataSync uses to access a specific storage location, with a customer-managed Identity and Access Management (IAM) role that provides access to the secret.
dns_ip_addressesarrayThe IPv4 or IPv6 addresses for the DNS servers that your SMB file server belongs to. This element applies only if AuthenticationType is set to KERBEROS.
domainstringThe name of the Windows domain that the SMB file server belongs to. This element applies only if AuthenticationType is set to NTLM. (pattern: <code>^[A-Za-z0-9]((.|-+)?[A-Za-z0-9]){0,252}$</code>)
kerberos_principalstringThe Kerberos principal that has permission to access the files, folders, and file metadata in your SMB file server. (pattern: <code>^.+$</code>)
location_arnstringThe ARN of the SMB location. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):datasync:[a-z-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$</code>)
location_uristringThe URI of the SMB location. (pattern: <code>^(efs|nfs|s3|smb|hdfs|fsx[a-z0-9-]+):​//[a-zA-Z0-9.:/-]+$</code>)
managed_secret_configobjectDescribes configuration information for a DataSync-managed secret, such as a Password or KerberosKeytab that DataSync uses to access a specific storage location. DataSync uses the default Amazon Web Services-managed KMS key to encrypt this secret in Secrets Manager.
mount_optionsobjectSpecifies the version of the Server Message Block (SMB) protocol that DataSync uses to access an SMB file server.
userstringThe user that can mount and access the files, folders, and file metadata in your SMB file server. This element applies only if AuthenticationType is set to NTLM. (pattern: <code>^[^\x22\x5B\x5D/\:;|=,+*?\x3C\x3E]{1,104}$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_location_smbselectregionProvides details about how an DataSync transfer location for a Server Message Block (SMB) file server is configured.
create_location_smbinsertregion, Subdirectory, ServerHostname, AgentArnsCreates a transfer location for a Server Message Block (SMB) file server. DataSync can use this location as a source or destination for transferring data. Before you begin, make sure that you understand how DataSync accesses SMB file servers. For more information, see Providing DataSync access to SMB file servers.
update_location_smbupdateregion, LocationArnModifies the following configuration parameters of the Server Message Block (SMB) transfer location that you're using with DataSync. For more information, see Configuring DataSync transfers with an SMB file server.

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

Provides details about how an DataSync transfer location for a Server Message Block (SMB) file server is configured.

SELECT
agent_arns,
authentication_type,
cmk_secret_config,
creation_time,
custom_secret_config,
dns_ip_addresses,
domain,
kerberos_principal,
location_arn,
location_uri,
managed_secret_config,
mount_options,
user
FROM aws.datasync.location_smbs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a transfer location for a Server Message Block (SMB) file server. DataSync can use this location as a source or destination for transferring data. Before you begin, make sure that you understand how DataSync accesses SMB file servers. For more information, see Providing DataSync access to SMB file servers.

INSERT INTO aws.datasync.location_smbs (
Subdirectory,
ServerHostname,
User,
Domain,
Password,
CmkSecretConfig,
CustomSecretConfig,
AgentArns,
MountOptions,
Tags,
AuthenticationType,
DnsIpAddresses,
KerberosPrincipal,
KerberosKeytab,
KerberosKrb5Conf,
region
)
SELECT
'{{ Subdirectory }}' /* required */,
'{{ ServerHostname }}' /* required */,
'{{ User }}',
'{{ Domain }}',
'{{ Password }}',
'{{ CmkSecretConfig }}',
'{{ CustomSecretConfig }}',
'{{ AgentArns }}' /* required */,
'{{ MountOptions }}',
'{{ Tags }}',
'{{ AuthenticationType }}',
'{{ DnsIpAddresses }}',
'{{ KerberosPrincipal }}',
'{{ KerberosKeytab }}',
'{{ KerberosKrb5Conf }}',
'{{ region }}'
RETURNING
location_arn
;

UPDATE examples

Modifies the following configuration parameters of the Server Message Block (SMB) transfer location that you're using with DataSync. For more information, see Configuring DataSync transfers with an SMB file server.

UPDATE aws.datasync.location_smbs
SET
LocationArn = '{{ LocationArn }}',
Subdirectory = '{{ Subdirectory }}',
ServerHostname = '{{ ServerHostname }}',
User = '{{ User }}',
Domain = '{{ Domain }}',
Password = '{{ Password }}',
CmkSecretConfig = '{{ CmkSecretConfig }}',
CustomSecretConfig = '{{ CustomSecretConfig }}',
AgentArns = '{{ AgentArns }}',
MountOptions = '{{ MountOptions }}',
AuthenticationType = '{{ AuthenticationType }}',
DnsIpAddresses = '{{ DnsIpAddresses }}',
KerberosPrincipal = '{{ KerberosPrincipal }}',
KerberosKeytab = '{{ KerberosKeytab }}',
KerberosKrb5Conf = '{{ KerberosKrb5Conf }}'
WHERE
region = '{{ region }}' --required
AND LocationArn = '{{ LocationArn }}' --required;