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 | aws.datasync.location_smbs |
Fields
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. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | User, AgentArns, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all location_smbs
in a region.
SELECT
region,
agent_arns,
domain,
mount_options,
password,
server_hostname,
subdirectory,
user,
tags,
location_arn,
location_uri
FROM aws.datasync.location_smbs
WHERE region = 'us-east-1';
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
FROM aws.datasync.location_smbs
WHERE region = 'us-east-1' AND data__Identifier = '<LocationArn>';
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 aws.datasync.location_smbs (
AgentArns,
User,
region
)
SELECT
'{{ AgentArns }}',
'{{ User }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.datasync.location_smbs (
AgentArns,
Domain,
MountOptions,
Password,
ServerHostname,
Subdirectory,
User,
Tags,
region
)
SELECT
'{{ AgentArns }}',
'{{ Domain }}',
'{{ MountOptions }}',
'{{ Password }}',
'{{ ServerHostname }}',
'{{ Subdirectory }}',
'{{ User }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: location_smb
props:
- name: AgentArns
value:
- '{{ AgentArns[0] }}'
- name: Domain
value: '{{ Domain }}'
- name: MountOptions
value:
Version: '{{ Version }}'
- name: Password
value: '{{ Password }}'
- name: ServerHostname
value: '{{ ServerHostname }}'
- name: Subdirectory
value: '{{ Subdirectory }}'
- name: User
value: '{{ User }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.datasync.location_smbs
WHERE data__Identifier = '<LocationArn>'
AND region = 'us-east-1';
Permissions
To operate on the location_smbs
resource, the following permissions are required:
Create
datasync:CreateLocationSmb,
datasync:DescribeLocationSmb,
datasync:ListTagsForResource,
datasync:TagResource
Read
datasync:DescribeLocationSmb,
datasync:ListTagsForResource
Update
datasync:DescribeLocationSmb,
datasync:ListTagsForResource,
datasync:TagResource,
datasync:UntagResource,
datasync:UpdateLocationSmb
Delete
datasync:DeleteLocation
List
datasync:ListLocations