- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateLocationFsxOntapCommand
Creates a transfer location for an Amazon FSx for NetApp ONTAP file system. DataSync can use this location as a source or destination for transferring data.
Before you begin, make sure that you understand how DataSync accesses FSx for ONTAP file systems .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataSyncClient, CreateLocationFsxOntapCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, CreateLocationFsxOntapCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // CreateLocationFsxOntapRequest
Protocol: { // FsxProtocol
NFS: { // FsxProtocolNfs
MountOptions: { // NfsMountOptions
Version: "AUTOMATIC" || "NFS3" || "NFS4_0" || "NFS4_1",
},
},
SMB: { // FsxProtocolSmb
Domain: "STRING_VALUE",
MountOptions: { // SmbMountOptions
Version: "AUTOMATIC" || "SMB2" || "SMB3" || "SMB1" || "SMB2_0",
},
Password: "STRING_VALUE", // required
User: "STRING_VALUE", // required
},
},
SecurityGroupArns: [ // Ec2SecurityGroupArnList // required
"STRING_VALUE",
],
StorageVirtualMachineArn: "STRING_VALUE", // required
Subdirectory: "STRING_VALUE",
Tags: [ // InputTagList
{ // TagListEntry
Key: "STRING_VALUE", // required
Value: "STRING_VALUE",
},
],
};
const command = new CreateLocationFsxOntapCommand(input);
const response = await client.send(command);
// { // CreateLocationFsxOntapResponse
// LocationArn: "STRING_VALUE",
// };
CreateLocationFsxOntapCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
Protocol Required | FsxProtocol | undefined | Specifies the data transfer protocol that DataSync uses to access your Amazon FSx file system. |
SecurityGroupArns Required | string[] | undefined | Specifies the Amazon EC2 security groups that provide access to your file system's preferred subnet. The security groups must allow outbound traffic on the following ports (depending on the protocol you use):
Your file system's security groups must also allow inbound traffic on the same ports. |
StorageVirtualMachineArn Required | string | undefined | Specifies the ARN of the storage virtual machine (SVM) in your file system where you want to copy data to or from. |
Subdirectory | string | undefined | Specifies a path to the file share in the SVM where you want to transfer data to or from. You can specify a junction path (also known as a mount point), qtree path (for NFS file shares), or share name (for SMB file shares). For example, your mount path might be Don't specify a junction path in the SVM's root volume. For more information, see Managing FSx for ONTAP storage virtual machines in the Amazon FSx for NetApp ONTAP User Guide. |
Tags | TagListEntry[] | undefined | Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location. |
CreateLocationFsxOntapCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
LocationArn | string | undefined | Specifies the ARN of the FSx for ONTAP file system location that you create. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalException | server | This exception is thrown when an error occurs in the DataSync service. |
InvalidRequestException | client | This exception is thrown when the client submits a malformed request. |
DataSyncServiceException | Base exception class for all service exceptions from DataSync service. |