location_smbs
Creates, updates, deletes or gets a location_smb resource or lists location_smbs in a region
Overview
| Name | location_smbs |
| Type | Resource |
| Description | Resource schema for AWS::DataSync::LocationSMB. |
| Id | awscc.datasync.location_smbs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
agent_arns | array | The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location. |
domain | string | The name of the Windows domain that the SMB server belongs to. |
mount_options | object | The mount options used by DataSync to access the SMB server. |
password | string | The password of the user who can mount the share and has the permissions to access files and folders in the SMB share. |
server_hostname | string | The name of the SMB server. This value is the IP address or Domain Name Service (DNS) name of the SMB server. |
subdirectory | string | The subdirectory in the SMB file system that is used to read data from the SMB source location or write data to the SMB destination |
user | string | The user who can mount the share, has the permissions to access files and folders in the SMB share. |
tags | array | An array of key-value pairs to apply to this resource. |
location_arn | string | The Amazon Resource Name (ARN) of the SMB location that is created. |
location_uri | string | The URL of the SMB location that was described. |
authentication_type | string | The authentication mode used to determine identity of user. |
dns_ip_addresses | array | Specifies 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_principal | string | Specifies 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_keytab | string | The 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_conf | string | The 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. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
location_arn | string | The Amazon Resource Name (ARN) of the SMB location that is created. |
region | string | AWS region. |
For more information, see AWS::DataSync::LocationSMB.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | location_smbs | INSERT | AgentArns, region |
delete_resource | location_smbs | DELETE | Identifier, region |
update_resource | location_smbs | UPDATE | Identifier, PatchDocument, region |
list_resources | location_smbs_list_only | SELECT | region |
get_resource | location_smbs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ location_arn }}';
Lists all location_smbs in a region.
SELECT
region,
location_arn
FROM awscc.datasync.location_smbs_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new location_smb resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.datasync.location_smbs (
AgentArns,
region
)
SELECT
'{{ agent_arns }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.datasync.location_smbs (
AgentArns,
Domain,
MountOptions,
Password,
ServerHostname,
Subdirectory,
User,
Tags,
AuthenticationType,
DnsIpAddresses,
KerberosPrincipal,
KerberosKeytab,
KerberosKrb5Conf,
region
)
SELECT
'{{ agent_arns }}',
'{{ domain }}',
'{{ mount_options }}',
'{{ password }}',
'{{ server_hostname }}',
'{{ subdirectory }}',
'{{ user }}',
'{{ tags }}',
'{{ authentication_type }}',
'{{ dns_ip_addresses }}',
'{{ kerberos_principal }}',
'{{ kerberos_keytab }}',
'{{ kerberos_krb5_conf }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: location_smb
props:
- name: agent_arns
value:
- '{{ agent_arns[0] }}'
- name: domain
value: '{{ domain }}'
- name: mount_options
value:
version: '{{ version }}'
- name: password
value: '{{ password }}'
- name: server_hostname
value: '{{ server_hostname }}'
- name: subdirectory
value: '{{ subdirectory }}'
- name: user
value: '{{ user }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: authentication_type
value: '{{ authentication_type }}'
- name: dns_ip_addresses
value:
- '{{ dns_ip_addresses[0] }}'
- name: kerberos_principal
value: '{{ kerberos_principal }}'
- name: kerberos_keytab
value: '{{ kerberos_keytab }}'
- name: kerberos_krb5_conf
value: '{{ kerberos_krb5_conf }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.datasync.location_smbs
WHERE
Identifier = '{{ location_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the location_smbs resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
datasync:CreateLocationSmb,
datasync:DescribeLocationSmb,
datasync:ListTagsForResource,
datasync:TagResource
datasync:DescribeLocationSmb,
datasync:ListTagsForResource
datasync:DescribeLocationSmb,
datasync:ListTagsForResource,
datasync:TagResource,
datasync:UntagResource,
datasync:UpdateLocationSmb
datasync:DeleteLocation
datasync:ListLocations