listSecurityControlDefinitions method

Future<ListSecurityControlDefinitionsResponse> listSecurityControlDefinitions({
  1. int? maxResults,
  2. String? nextToken,
  3. String? standardsArn,
})

Lists all of the security controls that apply to a specified standard.

May throw InternalException. May throw InvalidAccessException. May throw InvalidInputException. May throw LimitExceededException.

Parameter maxResults : An optional parameter that limits the total results of the API response to the specified number. If this parameter isn't provided in the request, the results include the first 25 security controls that apply to the specified standard. The results also include a NextToken parameter that you can use in a subsequent API call to get the next 25 controls. This repeats until all controls for the standard are returned.

Parameter nextToken : Optional pagination parameter.

Parameter standardsArn : The Amazon Resource Name (ARN) of the standard that you want to view controls for.

Implementation

Future<ListSecurityControlDefinitionsResponse>
    listSecurityControlDefinitions({
  int? maxResults,
  String? nextToken,
  String? standardsArn,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
    if (standardsArn != null) 'StandardsArn': [standardsArn],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/securityControls/definitions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListSecurityControlDefinitionsResponse.fromJson(response);
}