createLocationFsxWindows method
Creates an endpoint for an Amazon FSx for Windows file system.
May throw InvalidRequestException. May throw InternalException.
Parameter fsxFilesystemArn
:
The Amazon Resource Name (ARN) for the FSx for Windows file system.
Parameter password
:
The password of the user who has the permissions to access files and
folders in the FSx for Windows file system.
Parameter securityGroupArns
:
The Amazon Resource Names (ARNs) of the security groups that are to use to
configure the FSx for Windows file system.
Parameter user
:
The user who has the permissions to access files and folders in the FSx
for Windows file system.
Parameter domain
:
The name of the Windows domain that the FSx for Windows server belongs to.
Parameter subdirectory
:
A subdirectory in the location’s path. This subdirectory in the Amazon FSx
for Windows file system is used to read data from the Amazon FSx for
Windows source location or write data to the FSx for Windows destination.
Parameter tags
:
The key-value pair that represents a tag that you want to add to the
resource. The value can be an empty string. This value helps you manage,
filter, and search for your resources. We recommend that you create a name
tag for your location.
Implementation
Future<CreateLocationFsxWindowsResponse> createLocationFsxWindows({
required String fsxFilesystemArn,
required String password,
required List<String> securityGroupArns,
required String user,
String? domain,
String? subdirectory,
List<TagListEntry>? tags,
}) async {
ArgumentError.checkNotNull(fsxFilesystemArn, 'fsxFilesystemArn');
_s.validateStringLength(
'fsxFilesystemArn',
fsxFilesystemArn,
0,
128,
isRequired: true,
);
ArgumentError.checkNotNull(password, 'password');
_s.validateStringLength(
'password',
password,
0,
104,
isRequired: true,
);
ArgumentError.checkNotNull(securityGroupArns, 'securityGroupArns');
ArgumentError.checkNotNull(user, 'user');
_s.validateStringLength(
'user',
user,
0,
104,
isRequired: true,
);
_s.validateStringLength(
'domain',
domain,
0,
253,
);
_s.validateStringLength(
'subdirectory',
subdirectory,
0,
4096,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'FmrsService.CreateLocationFsxWindows'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FsxFilesystemArn': fsxFilesystemArn,
'Password': password,
'SecurityGroupArns': securityGroupArns,
'User': user,
if (domain != null) 'Domain': domain,
if (subdirectory != null) 'Subdirectory': subdirectory,
if (tags != null) 'Tags': tags,
},
);
return CreateLocationFsxWindowsResponse.fromJson(jsonResponse.body);
}