CreateLocationFsxWindows
Creates a transfer location for an Amazon FSx for Windows File Server file system. Amazon 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.
Request Syntax
{
"CmkSecretConfig": {
"KmsKeyArn": "string",
"SecretArn": "string"
},
"CustomSecretConfig": {
"SecretAccessRoleArn": "string",
"SecretArn": "string"
},
"Domain": "string",
"FsxFilesystemArn": "string",
"Password": "string",
"SecurityGroupArns": [ "string" ],
"Subdirectory": "string",
"Tags": [
{
"Key": "string",
"Value": "string"
}
],
"User": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- CmkSecretConfig
-
Specifies configuration information for a DataSync-managed secret, which includes the password that DataSync uses to access a specific FSx Windows storage location, with a customer-managed Amazon KMS key.
When you include this parameter as part of a
CreateLocationFsxWindowsrequest, you provide only the KMS key ARN. DataSync uses this KMS key together with thePasswordyou specify for to create a DataSync-managed secret to store the location access credentials.Make sure that DataSync has permission to access the KMS key that you specify. For more information, see Using a service-managed secret encrypted with a custom Amazon KMS key.
Note
You can use either
CmkSecretConfig(withPassword) orCustomSecretConfig(withoutPassword) to provide credentials for aCreateLocationFsxWindowsrequest. Do not provide both parameters for the same request.Type: CmkSecretConfig object
Required: No
- CustomSecretConfig
-
Specifies configuration information for a customer-managed Secrets Manager secret where the password for an FSx for Windows File Server storage location is stored in plain text, in Secrets Manager. This configuration includes the secret ARN, and the ARN for an IAM role that provides access to the secret. For more information, see Using a secret that you manage.
Note
You can use either
CmkSecretConfig(withPassword) orCustomSecretConfig(withoutPassword) to provide credentials for aCreateLocationFsxWindowsrequest. Do not provide both parameters for the same request.Type: CustomSecretConfig object
Required: No
- Domain
-
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.
Type: String
Length Constraints: Maximum length of 253.
Pattern:
^[A-Za-z0-9]((\.|-+)?[A-Za-z0-9]){0,252}$Required: No
- FsxFilesystemArn
-
Specifies the Amazon Resource Name (ARN) for the FSx for Windows File Server file system.
Type: String
Length Constraints: Maximum length of 128.
Pattern:
^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):fsx:[a-z\-0-9]+:[0-9]{12}:file-system/fs-[0-9a-f]+$Required: Yes
- Password
-
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.
Type: String
Length Constraints: Maximum length of 104.
Pattern:
^.{0,104}$Required: No
- SecurityGroupArns
-
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.
Note
If you choose a security group that doesn't allow connections from within itself, do one of the following:
-
Configure the security group to allow it to communicate within itself.
-
Choose a different security group that can communicate with the mount target's security group.
Type: Array of strings
Array Members: Minimum number of 1 item. Maximum number of 5 items.
Length Constraints: Maximum length of 128.
Pattern:
^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):ec2:[a-z\-0-9]*:[0-9]{12}:security-group/sg-[a-f0-9]+$Required: Yes
-
- Subdirectory
-
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).
Type: String
Length Constraints: Maximum length of 4096.
Pattern:
^[a-zA-Z0-9_\-\+\./\(\)\$\p{Zs}]+$Required: No
- 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.
Type: Array of TagListEntry objects
Array Members: Minimum number of 0 items. Maximum number of 50 items.
Required: No
- User
-
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.
Type: String
Length Constraints: Maximum length of 104.
Pattern:
^[^\x22\x5B\x5D/\\:;|=,+*?\x3C\x3E]{1,104}$Required: Yes
Response Syntax
{
"LocationArn": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- LocationArn
-
The ARN of the FSx for Windows File Server file system location you created.
Type: String
Length Constraints: Maximum length of 128.
Pattern:
^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):datasync:[a-z\-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalException
-
This exception is thrown when an error occurs in the Amazon DataSync service.
HTTP Status Code: 500
- InvalidRequestException
-
This exception is thrown when the client submits a malformed request.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific Amazon SDKs, see the following: