Skip to content

list_aggregators_v2 async

list_aggregators_v2(
    *,
    config_overrides: Optional[AsyncSecurityHubClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListAggregatorsV2Response

Retrieves a list of V2 aggregators.

Parameters:

  • next_token (Optional[NextToken], default: None ) –

    The token required for pagination. On your first call, set the value of this parameter to NULL. For subsequent calls, to continue listing data, set the value of this parameter to the value returned in the previous response.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return.

Raises:

Source code in docs_src/capo_securityhub/_services/async_security_hub.py
async def list_aggregators_v2(
    self,
    *,
    config_overrides: Optional[AsyncSecurityHubClientConfig] = None,
    next_token: Optional["capo_securityhub.types.next_token.NextToken"] = None,
    max_results: Optional["capo_securityhub.types.max_results.MaxResults"] = None,
) -> (
    "capo_securityhub.types.list_aggregators_v2_response.ListAggregatorsV2Response"
):
    """<p>Retrieves a list of V2 aggregators.</p>

    Args:
        next_token: <p>The token required for pagination. On your first call, set the value of this parameter to <code>NULL</code>. For subsequent calls, to continue listing data, set the value of this parameter to the value returned in the previous response.</p>
        max_results: <p>The maximum number of results to return.</p>

    Raises:
        capo_securityhub.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action specified in the request.</p>
        capo_securityhub.errors.conflict_exception.ConflictException: <p>The request causes conflict with the current state of the service resource.</p>
        capo_securityhub.errors.internal_server_exception.InternalServerException: <p> The request has failed due to an internal failure of the service. </p>
        capo_securityhub.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request was rejected because we can't find the specified resource.</p>
        capo_securityhub.errors.throttling_exception.ThrottlingException: <p> The limit on the number of requests per second was exceeded. </p>
        capo_securityhub.errors.validation_exception.ValidationException: <p>The request has failed validation because it's missing required fields or has invalid inputs.</p>
        capo_securityhub.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_securityhub.types.list_aggregators_v2_request.ListAggregatorsV2Request]",
    ) -> AsyncOperationResponse[
        "capo_securityhub.types.list_aggregators_v2_response.ListAggregatorsV2Response"
    ]:
        import capo_securityhub._operations.security_hub_api_service.list_aggregators_v2

        (
            output,
            http_response,
        ) = await capo_securityhub._operations.security_hub_api_service.list_aggregators_v2.async_list_aggregators_v2(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAggregatorsV2")
    )
    input_: capo_securityhub.types.list_aggregators_v2_request.ListAggregatorsV2Request = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output