getProtocolsList method
Returns information about the specified AWS Firewall Manager protocols list.
May throw ResourceNotFoundException. May throw InvalidOperationException. May throw InternalErrorException.
Parameter listId
:
The ID of the AWS Firewall Manager protocols list that you want the
details for.
Parameter defaultList
:
Specifies whether the list to retrieve is a default list owned by AWS
Firewall Manager.
Implementation
Future<GetProtocolsListResponse> getProtocolsList({
required String listId,
bool? defaultList,
}) async {
ArgumentError.checkNotNull(listId, 'listId');
_s.validateStringLength(
'listId',
listId,
36,
36,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSFMS_20180101.GetProtocolsList'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ListId': listId,
if (defaultList != null) 'DefaultList': defaultList,
},
);
return GetProtocolsListResponse.fromJson(jsonResponse.body);
}