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 | awscc.datasync.location_efs |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
location_arn | string | The Amazon Resource Name (ARN) of the Amazon EFS file system location that is created. |
region | string | AWS region. |
For more information, see AWS::DataSync::LocationEFS.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | location_efs | INSERT | Ec2Config, region |
delete_resource | location_efs | DELETE | Identifier, region |
update_resource | location_efs | UPDATE | Identifier, PatchDocument, region |
list_resources | location_efs_list_only | SELECT | region |
get_resource | location_efs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.datasync.location_efs
WHERE
region = '{{ region }}' AND
Identifier = '{{ location_arn }}';
Lists all location_efs in a region.
SELECT
region,
location_arn
FROM awscc.datasync.location_efs_list_only
WHERE
region = '{{ region }}';
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 awscc.datasync.location_efs (
Ec2Config,
region
)
SELECT
'{{ ec2_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.datasync.location_efs (
Ec2Config,
EfsFilesystemArn,
AccessPointArn,
FileSystemAccessRoleArn,
InTransitEncryption,
Subdirectory,
Tags,
region
)
SELECT
'{{ ec2_config }}',
'{{ efs_filesystem_arn }}',
'{{ access_point_arn }}',
'{{ file_system_access_role_arn }}',
'{{ in_transit_encryption }}',
'{{ subdirectory }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: location_ef
props:
- name: ec2_config
value:
security_group_arns:
- '{{ security_group_arns[0] }}'
subnet_arn: '{{ subnet_arn }}'
- name: efs_filesystem_arn
value: '{{ efs_filesystem_arn }}'
- name: access_point_arn
value: '{{ access_point_arn }}'
- name: file_system_access_role_arn
value: '{{ file_system_access_role_arn }}'
- name: in_transit_encryption
value: '{{ in_transit_encryption }}'
- name: subdirectory
value: '{{ subdirectory }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a location_ef resource, using stack-deploy.
/*+ update */
UPDATE awscc.datasync.location_efs
SET PatchDocument = string('{{ {
"AccessPointArn": access_point_arn,
"FileSystemAccessRoleArn": file_system_access_role_arn,
"InTransitEncryption": in_transit_encryption,
"Subdirectory": subdirectory,
"Tags": tags
} | 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_efs
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:
| Parameter | Description |
|---|---|
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_efs resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
datasync:CreateLocationEfs,
datasync:DescribeLocationEfs,
datasync:ListTagsForResource,
datasync:TagResource,
elasticfilesystem:DescribeFileSystems,
elasticfilesystem:DescribeMountTargets,
elasticfilesystem:DescribeAccessPoints,
iam:PassRole,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups
datasync:DescribeLocationEfs,
datasync:ListTagsForResource
datasync:UpdateLocationEfs,
datasync:DescribeLocationEfs,
datasync:ListTagsForResource,
datasync:TagResource,
datasync:UntagResource,
elasticfilesystem:DescribeFileSystems,
elasticfilesystem:DescribeAccessPoints,
iam:PassRole
datasync:DeleteLocation
datasync:ListLocations