listCodeSecurityScanConfigurationAssociations method

Future<ListCodeSecurityScanConfigurationAssociationsResponse> listCodeSecurityScanConfigurationAssociations({
  1. required String scanConfigurationArn,
  2. int? maxResults,
  3. String? nextToken,
})

Lists the associations between code repositories and Amazon Inspector code security scan configurations.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter scanConfigurationArn : The Amazon Resource Name (ARN) of the scan configuration to list associations for.

Parameter maxResults : The maximum number of results to return in the response. If your request would return more than the maximum the response will return a nextToken value, use this value when you call the action again to get the remaining results.

Parameter nextToken : A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.

Implementation

Future<ListCodeSecurityScanConfigurationAssociationsResponse>
    listCodeSecurityScanConfigurationAssociations({
  required String scanConfigurationArn,
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final $payload = <String, dynamic>{
    'scanConfigurationArn': scanConfigurationArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/codesecurity/scan-configuration/associations/list',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListCodeSecurityScanConfigurationAssociationsResponse.fromJson(
      response);
}