createLocationFsxLustre method
Creates a transfer location for an Amazon FSx for Lustre 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 Lustre file systems.
May throw InternalException.
May throw InvalidRequestException.
Parameter fsxFilesystemArn :
Specifies the Amazon Resource Name (ARN) of the FSx for Lustre file
system.
Parameter securityGroupArns :
Specifies the Amazon Resource Names (ARNs) of up to five security groups
that provide access to your FSx for Lustre file system.
The security groups must be able to access the file system's ports. The file system must also allow access from the security groups. For information about file system access, see the Amazon FSx for Lustre User Guide .
Parameter subdirectory :
Specifies a mount path for your FSx for Lustre file system. The path can
include subdirectories.
When the location is used as a source, DataSync reads data from the mount
path. When the location is used as a destination, DataSync writes data to
the mount path. If you don't include this parameter, DataSync uses the
file system's root directory (/).
Parameter tags :
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.
Implementation
Future<CreateLocationFsxLustreResponse> createLocationFsxLustre({
required String fsxFilesystemArn,
required List<String> securityGroupArns,
String? subdirectory,
List<TagListEntry>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'FmrsService.CreateLocationFsxLustre'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FsxFilesystemArn': fsxFilesystemArn,
'SecurityGroupArns': securityGroupArns,
if (subdirectory != null) 'Subdirectory': subdirectory,
if (tags != null) 'Tags': tags,
},
);
return CreateLocationFsxLustreResponse.fromJson(jsonResponse.body);
}