disassociateFileSystemAliases method
Use this action to disassociate, or remove, one or more Domain Name Service (DNS) aliases from an Amazon FSx for Windows File Server file system. If you attempt to disassociate a DNS alias that is not associated with the file system, Amazon FSx responds with a 400 Bad Request. For more information, see Working with DNS Aliases.
The system generated response showing the DNS aliases that Amazon FSx is attempting to disassociate from the file system. Use the API operation to monitor the status of the aliases Amazon FSx is disassociating with the file system.
May throw BadRequest. May throw FileSystemNotFound. May throw InternalServerError.
Parameter aliases
:
An array of one or more DNS alias names to disassociate, or remove, from
the file system.
Parameter fileSystemId
:
Specifies the file system from which to disassociate the DNS aliases.
Implementation
Future<DisassociateFileSystemAliasesResponse> disassociateFileSystemAliases({
required List<String> aliases,
required String fileSystemId,
String? clientRequestToken,
}) async {
ArgumentError.checkNotNull(aliases, 'aliases');
ArgumentError.checkNotNull(fileSystemId, 'fileSystemId');
_s.validateStringLength(
'fileSystemId',
fileSystemId,
11,
21,
isRequired: true,
);
_s.validateStringLength(
'clientRequestToken',
clientRequestToken,
1,
63,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWSSimbaAPIService_v20180301.DisassociateFileSystemAliases'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Aliases': aliases,
'FileSystemId': fileSystemId,
'ClientRequestToken':
clientRequestToken ?? _s.generateIdempotencyToken(),
},
);
return DisassociateFileSystemAliasesResponse.fromJson(jsonResponse.body);
}