updateACL method
Changes the list of users that belong to the Access Control List.
May throw ACLNotFoundFault.
May throw DefaultUserRequired.
May throw DuplicateUserNameFault.
May throw InvalidACLStateFault.
May throw InvalidParameterCombinationException.
May throw InvalidParameterValueException.
May throw UserNotFoundFault.
Parameter aCLName :
The name of the Access Control List.
Parameter userNamesToAdd :
The list of users to add to the Access Control List.
Parameter userNamesToRemove :
The list of users to remove from the Access Control List.
Implementation
Future<UpdateACLResponse> updateACL({
required String aCLName,
List<String>? userNamesToAdd,
List<String>? userNamesToRemove,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonMemoryDB.UpdateACL'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ACLName': aCLName,
if (userNamesToAdd != null) 'UserNamesToAdd': userNamesToAdd,
if (userNamesToRemove != null) 'UserNamesToRemove': userNamesToRemove,
},
);
return UpdateACLResponse.fromJson(jsonResponse.body);
}