location_nfs
Creates, updates, deletes or gets a location_nf
resource or lists location_nfs
in a region
Overview
Name | location_nfs |
Type | Resource |
Description | Resource schema for AWS::DataSync::LocationNFS |
Id | aws.datasync.location_nfs |
Fields
Name | Datatype | Description |
---|---|---|
mount_options | object | The mount options used by DataSync to access the SMB server. |
on_prem_config | object | Contains a list of Amazon Resource Names (ARNs) of agents that are used to connect an NFS server. |
server_hostname | string | The name of the NFS server. This value is the IP address or DNS name of the NFS server. |
subdirectory | string | The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination. |
tags | array | An array of key-value pairs to apply to this resource. |
location_arn | string | The Amazon Resource Name (ARN) of the NFS location. |
location_uri | string | The URL of the NFS location that was described. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | OnPremConfig, 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_nfs
in a region.
SELECT
region,
mount_options,
on_prem_config,
server_hostname,
subdirectory,
tags,
location_arn,
location_uri
FROM aws.datasync.location_nfs
WHERE region = 'us-east-1';
Gets all properties from an individual location_nf
.
SELECT
region,
mount_options,
on_prem_config,
server_hostname,
subdirectory,
tags,
location_arn,
location_uri
FROM aws.datasync.location_nfs
WHERE region = 'us-east-1' AND data__Identifier = '<LocationArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new location_nf
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.datasync.location_nfs (
OnPremConfig,
region
)
SELECT
'{{ OnPremConfig }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.datasync.location_nfs (
MountOptions,
OnPremConfig,
ServerHostname,
Subdirectory,
Tags,
region
)
SELECT
'{{ MountOptions }}',
'{{ OnPremConfig }}',
'{{ ServerHostname }}',
'{{ Subdirectory }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: location_nf
props:
- name: MountOptions
value:
Version: '{{ Version }}'
- name: OnPremConfig
value:
AgentArns:
- '{{ AgentArns[0] }}'
- name: ServerHostname
value: '{{ ServerHostname }}'
- name: Subdirectory
value: '{{ Subdirectory }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.datasync.location_nfs
WHERE data__Identifier = '<LocationArn>'
AND region = 'us-east-1';
Permissions
To operate on the location_nfs
resource, the following permissions are required:
Create
datasync:CreateLocationNfs,
datasync:DescribeLocationNfs,
datasync:ListTagsForResource,
datasync:TagResource
Read
datasync:DescribeLocationNfs,
datasync:ListTagsForResource
Update
datasync:DescribeLocationNfs,
datasync:ListTagsForResource,
datasync:TagResource,
datasync:UntagResource,
datasync:UpdateLocationNfs
Delete
datasync:DeleteLocation
List
datasync:ListLocations