getAppsList method

Future<GetAppsListResponse> getAppsList({
  1. required String listId,
  2. bool? defaultList,
})

Returns information about the specified AWS Firewall Manager applications list.

May throw ResourceNotFoundException. May throw InvalidOperationException. May throw InternalErrorException.

Parameter listId : The ID of the AWS Firewall Manager applications 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<GetAppsListResponse> getAppsList({
  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.GetAppsList'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ListId': listId,
      if (defaultList != null) 'DefaultList': defaultList,
    },
  );

  return GetAppsListResponse.fromJson(jsonResponse.body);
}