- 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.
CreateLocationFsxWindowsCommand
Creates a transfer location for an Amazon FSx for Windows File Server 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 Windows File Server file systems .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataSyncClient, CreateLocationFsxWindowsCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, CreateLocationFsxWindowsCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // CreateLocationFsxWindowsRequest
Subdirectory: "STRING_VALUE",
FsxFilesystemArn: "STRING_VALUE", // required
SecurityGroupArns: [ // Ec2SecurityGroupArnList // required
"STRING_VALUE",
],
Tags: [ // InputTagList
{ // TagListEntry
Key: "STRING_VALUE", // required
Value: "STRING_VALUE",
},
],
User: "STRING_VALUE", // required
Domain: "STRING_VALUE",
Password: "STRING_VALUE", // required
};
const command = new CreateLocationFsxWindowsCommand(input);
const response = await client.send(command);
// { // CreateLocationFsxWindowsResponse
// LocationArn: "STRING_VALUE",
// };
CreateLocationFsxWindowsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
FsxFilesystemArn Required | string | undefined | Specifies the Amazon Resource Name (ARN) for the FSx for Windows File Server file system. |
Password Required | string | undefined | Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system. |
SecurityGroupArns Required | string[] | undefined | Specifies the ARNs of the Amazon EC2 security groups that provide access to your file system's preferred subnet. The security groups that you specify must be able to communicate with your file system's security groups. For information about configuring security groups for file system access, see the Amazon FSx for Windows File Server User Guide . If you choose a security group that doesn't allow connections from within itself, do one of the following:
|
User Required | string | undefined | Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system. For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations. |
Domain | string | undefined | Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to. If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system. |
Subdirectory | string | undefined | Specifies a mount path for your file system using forward slashes. This is where DataSync reads or writes data (depending on if this is a source or destination location). |
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. |
CreateLocationFsxWindowsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
LocationArn | string | undefined | The ARN of the FSx for Windows File Server file system location you created. |
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. |