Skip to main content

location_smbs

Creates, updates, deletes or gets a location_smb resource or lists location_smbs in a region

Overview

Namelocation_smbs
TypeResource
DescriptionResource schema for AWS::DataSync::LocationSMB.
Idawscc.datasync.location_smbs

Fields

NameDatatypeDescription
agent_arnsarrayThe Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location.
domainstringThe name of the Windows domain that the SMB server belongs to.
mount_optionsobjectThe mount options used by DataSync to access the SMB server.
passwordstringThe password of the user who can mount the share and has the permissions to access files and folders in the SMB share.
server_hostnamestringThe name of the SMB server. This value is the IP address or Domain Name Service (DNS) name of the SMB server.
subdirectorystringThe subdirectory in the SMB file system that is used to read data from the SMB source location or write data to the SMB destination
userstringThe user who can mount the share, has the permissions to access files and folders in the SMB share.
tagsarrayAn array of key-value pairs to apply to this resource.
location_arnstringThe Amazon Resource Name (ARN) of the SMB location that is created.
location_uristringThe URL of the SMB location that was described.
authentication_typestringThe authentication mode used to determine identity of user.
dns_ip_addressesarraySpecifies the IPv4 addresses for the DNS servers that your SMB file server belongs to. This parameter applies only if AuthenticationType is set to KERBEROS. If you have multiple domains in your environment, configuring this parameter makes sure that DataSync connects to the right SMB file server.
kerberos_principalstringSpecifies a service principal name (SPN), which is an identity in your Kerberos realm that has permission to access the files, folders, and file metadata in your SMB file server. SPNs are case sensitive and must include a prepended cifs/. For example, an SPN might look like cifs/kerberosuser@EXAMPLE.COM. Your task execution will fail if the SPN that you provide for this parameter doesn't match exactly what's in your keytab or krb5.conf files.
kerberos_keytabstringThe Base64 string representation of the Keytab file. Specifies your Kerberos key table (keytab) file, which includes mappings between your service principal name (SPN) and encryption keys. To avoid task execution errors, make sure that the SPN in the keytab file matches exactly what you specify for KerberosPrincipal and in your krb5.conf file.
kerberos_krb5_confstringThe string representation of the Krb5Conf file, or the presigned URL to access the Krb5.conf file within an S3 bucket. Specifies a Kerberos configuration file (krb5.conf) that defines your Kerberos realm configuration. To avoid task execution errors, make sure that the service principal name (SPN) in the krb5.conf file matches exactly what you specify for KerberosPrincipal and in your keytab file.
regionstringAWS region.

For more information, see AWS::DataSync::LocationSMB.

Methods

NameResourceAccessible byRequired Params
create_resourcelocation_smbsINSERTAgentArns, region
delete_resourcelocation_smbsDELETEIdentifier, region
update_resourcelocation_smbsUPDATEIdentifier, PatchDocument, region
list_resourceslocation_smbs_list_onlySELECTregion
get_resourcelocation_smbsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual location_smb.

SELECT
region,
agent_arns,
domain,
mount_options,
password,
server_hostname,
subdirectory,
user,
tags,
location_arn,
location_uri,
authentication_type,
dns_ip_addresses,
kerberos_principal,
kerberos_keytab,
kerberos_krb5_conf
FROM awscc.datasync.location_smbs
WHERE
region = '{{ region }}' AND
Identifier = '{{ location_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new location_smb resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.datasync.location_smbs (
AgentArns,
region
)
SELECT
'{{ agent_arns }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a location_smb resource, using stack-deploy.

/*+ update */
UPDATE awscc.datasync.location_smbs
SET PatchDocument = string('{{ {
"AgentArns": agent_arns,
"Domain": domain,
"MountOptions": mount_options,
"Password": password,
"ServerHostname": server_hostname,
"Subdirectory": subdirectory,
"User": user,
"Tags": tags,
"AuthenticationType": authentication_type,
"DnsIpAddresses": dns_ip_addresses,
"KerberosPrincipal": kerberos_principal,
"KerberosKeytab": kerberos_keytab,
"KerberosKrb5Conf": kerberos_krb5_conf
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ location_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.datasync.location_smbs
WHERE
Identifier = '{{ location_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the location_smbs resource, the following permissions are required:

datasync:CreateLocationSmb,
datasync:DescribeLocationSmb,
datasync:ListTagsForResource,
datasync:TagResource