updateList method
Updates a list.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter name :
The name of the list to update.
Parameter description :
The new description.
Parameter elements :
One or more list elements to add or replace. If you are providing the
elements, make sure to specify the updateMode to use.
If you are deleting all elements from the list, use REPLACE
for the updateMode and provide an empty list (0 elements).
Parameter updateMode :
The update mode (type).
-
Use
APPENDif you are adding elements to the list. -
Use
REPLACEif you replacing existing elements in the list. -
Use
REMOVEif you are removing elements from the list.
Parameter variableType :
The variable type you want to assign to the list.
Implementation
Future<void> updateList({
required String name,
String? description,
List<String>? elements,
ListUpdateMode? updateMode,
String? variableType,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSHawksNestServiceFacade.UpdateList'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'name': name,
if (description != null) 'description': description,
if (elements != null) 'elements': elements,
if (updateMode != null) 'updateMode': updateMode.value,
if (variableType != null) 'variableType': variableType,
},
);
}