location_efs
Creates, updates, deletes or gets a location_ef
resource or lists location_efs
in a region
Overview
Name | location_efs |
Type | Resource |
Description | Resource schema for AWS::DataSync::LocationEFS. |
Id | aws.datasync.location_efs |
Fields
Name | Datatype | Description |
---|---|---|
ec2_config | object | The subnet and security group that DataSync uses to access target EFS file system. |
efs_filesystem_arn | string | The Amazon Resource Name (ARN) for the Amazon EFS file system. |
access_point_arn | string | The Amazon Resource Name (ARN) for the Amazon EFS Access point that DataSync uses when accessing the EFS file system. |
file_system_access_role_arn | string | The Amazon Resource Name (ARN) of the AWS IAM role that the DataSync will assume when mounting the EFS file system. |
in_transit_encryption | string | Protocol that is used for encrypting the traffic exchanged between the DataSync Agent and the EFS file system. |
subdirectory | string | A subdirectory in the location's path. This subdirectory in the EFS file system is used to read data from the EFS source location or write data to the EFS destination. |
tags | array | An array of key-value pairs to apply to this resource. |
location_arn | string | The Amazon Resource Name (ARN) of the Amazon EFS file system location that is created. |
location_uri | string | The URL of the EFS location that was described. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Ec2Config, 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_efs
in a region.
SELECT
region,
ec2_config,
efs_filesystem_arn,
access_point_arn,
file_system_access_role_arn,
in_transit_encryption,
subdirectory,
tags,
location_arn,
location_uri
FROM aws.datasync.location_efs
WHERE region = 'us-east-1';
Gets all properties from an individual location_ef
.
SELECT
region,
ec2_config,
efs_filesystem_arn,
access_point_arn,
file_system_access_role_arn,
in_transit_encryption,
subdirectory,
tags,
location_arn,
location_uri
FROM aws.datasync.location_efs
WHERE region = 'us-east-1' AND data__Identifier = '<LocationArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new location_ef
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.datasync.location_efs (
Ec2Config,
region
)
SELECT
'{{ Ec2Config }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.datasync.location_efs (
Ec2Config,
EfsFilesystemArn,
AccessPointArn,
FileSystemAccessRoleArn,
InTransitEncryption,
Subdirectory,
Tags,
region
)
SELECT
'{{ Ec2Config }}',
'{{ EfsFilesystemArn }}',
'{{ AccessPointArn }}',
'{{ FileSystemAccessRoleArn }}',
'{{ InTransitEncryption }}',
'{{ Subdirectory }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: location_ef
props:
- name: Ec2Config
value:
SecurityGroupArns:
- '{{ SecurityGroupArns[0] }}'
SubnetArn: '{{ SubnetArn }}'
- name: EfsFilesystemArn
value: '{{ EfsFilesystemArn }}'
- name: AccessPointArn
value: '{{ AccessPointArn }}'
- name: FileSystemAccessRoleArn
value: '{{ FileSystemAccessRoleArn }}'
- name: InTransitEncryption
value: '{{ InTransitEncryption }}'
- name: Subdirectory
value: '{{ Subdirectory }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.datasync.location_efs
WHERE data__Identifier = '<LocationArn>'
AND region = 'us-east-1';
Permissions
To operate on the location_efs
resource, the following permissions are required:
Create
datasync:CreateLocationEfs,
datasync:DescribeLocationEfs,
datasync:ListTagsForResource,
datasync:TagResource,
elasticfilesystem:DescribeFileSystems,
elasticfilesystem:DescribeMountTargets,
elasticfilesystem:DescribeAccessPoints,
iam:PassRole,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups
Read
datasync:DescribeLocationEfs,
datasync:ListTagsForResource
Update
datasync:DescribeLocationEfs,
datasync:ListTagsForResource,
datasync:TagResource,
datasync:UntagResource
Delete
datasync:DeleteLocation
List
datasync:ListLocations