listControls method
Returns a paginated list of all available controls in the Control Catalog library. Allows you to discover available controls. The list of controls is given as structures of type controlSummary. The ARN is returned in the global controlcatalog format, as shown in the examples.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter filter :
An optional filter that narrows the results to controls with specific
implementation types or identifiers. If you don't provide a filter, the
operation returns all available controls.
Parameter maxResults :
The maximum number of results on a page or for an API request call.
Parameter nextToken :
The pagination token that's used to fetch the next set of results.
Implementation
Future<ListControlsResponse> listControls({
ControlFilter? filter,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final $payload = <String, dynamic>{
if (filter != null) 'Filter': filter,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/list-controls',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListControlsResponse.fromJson(response);
}