AWS::DataSync::LocationNFS - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::DataSync::LocationNFS

The AWS::DataSync::LocationNFS resource specifies a Network File System (NFS) file server that Amazon DataSync can use as a transfer source or destination.

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::DataSync::LocationNFS", "Properties" : { "MountOptions" : MountOptions, "OnPremConfig" : OnPremConfig, "ServerHostname" : String, "Subdirectory" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::DataSync::LocationNFS Properties: MountOptions: MountOptions OnPremConfig: OnPremConfig ServerHostname: String Subdirectory: String Tags: - Tag

Properties

MountOptions

Specifies the options that DataSync can use to mount your NFS file server.

Required: No

Type: MountOptions

Update requires: No interruption

OnPremConfig

Specifies the Amazon Resource Name (ARN) of the DataSync agent that want to connect to your NFS file server.

You can specify more than one agent. For more information, see Using multiple agents for transfers.

Required: Yes

Type: OnPremConfig

Update requires: No interruption

ServerHostname

Specifies the Domain Name System (DNS) name or IP version 4 address of the NFS file server that your DataSync agent connects to.

Required: No

Type: String

Pattern: ^(([a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9\-]*[A-Za-z0-9])$

Maximum: 255

Update requires: Replacement

Subdirectory

Specifies the export path in your NFS file server that you want DataSync to mount.

This path (or a subdirectory of the path) is where DataSync transfers data to or from. For information on configuring an export for DataSync, see Accessing NFS file servers.

Required: No

Type: String

Pattern: ^[a-zA-Z0-9_\-\+\./\(\)\$\p{Zs}]+$

Maximum: 4096

Update requires: No interruption

Tags

Specifies labels that help you categorize, filter, and search for your Amazon resources. We recommend creating at least a name tag for your location.

Required: No

Type: Array of Tag

Maximum: 50

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the location resource ARN. For example:

arn:aws:datasync:us-east-2:111222333444:location/loc-07db7abfc326c50s3

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

LocationArn

The Amazon Resource Name (ARN) of the NFS location that you created.

LocationUri

The URI of the NFS location that you created.

Examples

Create an NFS location for DataSync

The following example specifies an NFS location for DataSync, using a source and destination location. In this example, the server hostname is MyServer@example.com, using NFS version 4.0, in the subdirectory /MySubdirectory.

JSON

{ "Resources": { "LocationNFS": { "Type": "AWS::DataSync::LocationNFS", "Properties": { "MountOptions": { "Version": "NFS4_0" }, "OnPremConfig": { "AgentArns": [ "arn:aws:datasync:us-east-2:111222333444:agent/agent-000addbcdf44bbnfs" ] }, "ServerHostname": "MyServer@example.com", "Subdirectory": "/MySubdirectory" } } } }

YAML

Resources: LocationNFS: Type: 'AWS::DataSync::LocationNFS' Properties: MountOptions: Version: NFS4_0 OnPremConfig: AgentArns: - >- arn:aws:datasync:us-east-2:111222333444:agent/agent-000addbcdf44bbnfs ServerHostname: MyServer@example.com Subdirectory: /MySubdirectory