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 | awscc.datasync.location_nfs |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
location_arn | string | The Amazon Resource Name (ARN) of the NFS location. |
region | string | AWS region. |
For more information, see AWS::DataSync::LocationNFS.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | location_nfs | INSERT | OnPremConfig, region |
delete_resource | location_nfs | DELETE | Identifier, region |
update_resource | location_nfs | UPDATE | Identifier, PatchDocument, region |
list_resources | location_nfs_list_only | SELECT | region |
get_resource | location_nfs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual location_nf.
SELECT
region,
mount_options,
on_prem_config,
server_hostname,
subdirectory,
tags,
location_arn,
location_uri
FROM awscc.datasync.location_nfs
WHERE
region = 'us-east-1' AND
Identifier = '{{ location_arn }}';
Lists all location_nfs in a region.
SELECT
region,
location_arn
FROM awscc.datasync.location_nfs_list_only
WHERE
region = 'us-east-1';
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 awscc.datasync.location_nfs (
OnPremConfig,
region
)
SELECT
'{{ on_prem_config }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.datasync.location_nfs (
MountOptions,
OnPremConfig,
ServerHostname,
Subdirectory,
Tags,
region
)
SELECT
'{{ mount_options }}',
'{{ on_prem_config }}',
'{{ server_hostname }}',
'{{ 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: mount_options
value:
version: '{{ version }}'
- name: on_prem_config
value:
agent_arns:
- '{{ agent_arns[0] }}'
- name: server_hostname
value: '{{ server_hostname }}'
- 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_nf resource, using stack-deploy.
/*+ update */
UPDATE awscc.datasync.location_nfs
SET PatchDocument = string('{{ {
"MountOptions": mount_options,
"OnPremConfig": on_prem_config,
"ServerHostname": server_hostname,
"Subdirectory": subdirectory,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ location_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.datasync.location_nfs
WHERE
Identifier = '{{ location_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the location_nfs resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
datasync:CreateLocationNfs,
datasync:DescribeLocationNfs,
datasync:ListTagsForResource,
datasync:TagResource
datasync:DescribeLocationNfs,
datasync:ListTagsForResource
datasync:DescribeLocationNfs,
datasync:ListTagsForResource,
datasync:TagResource,
datasync:UntagResource,
datasync:UpdateLocationNfs
datasync:DeleteLocation
datasync:ListLocations