listStandardsControlAssociations method

Future<ListStandardsControlAssociationsResponse> listStandardsControlAssociations({
  1. required String securityControlId,
  2. int? maxResults,
  3. String? nextToken,
})

Specifies whether a control is currently enabled or disabled in each enabled standard in the calling account.

This operation omits standards control associations for standard subscriptions where StandardsControlsUpdatable has value NOT_READY_FOR_UPDATES.

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

Parameter securityControlId : The identifier of the control (identified with SecurityControlId, SecurityControlArn, or a mix of both parameters) that you want to determine the enablement status of in each enabled standard.

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 standard and control associations. The results also include a NextToken parameter that you can use in a subsequent API call to get the next 25 associations. This repeats until all associations for the specified control are returned. The number of results is limited by the number of supported Security Hub CSPM standards that you've enabled in the calling account.

Parameter nextToken : Optional pagination parameter.

Implementation

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