Skip to content

list_resource_scans async

list_resource_scans(
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[ResourceScannerMaxResults] = None,
    scan_type_filter: Optional[ScanType] = None,
) -> ListResourceScansOutput

List the resource scans from newest to oldest. By default it will return up to 10 resource scans.

Parameters:

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

    The token for the next set of items to return. (You received this token from a previous call.)

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

    If the number of available results exceeds this maximum, the response includes a NextToken value that you can use for the NextToken parameter to get the next set of results. The default value is 10. The maximum value is 100.

  • scan_type_filter (Optional[ScanType], default: None ) –

    The scan type that you want to get summary information about. The default is FULL.

Raises:

Source code in docs_src/capo_cloudformation/_services/async_cloud_formation.py
async def list_resource_scans(
    self,
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    next_token: Optional["capo_cloudformation.types.next_token.NextToken"] = None,
    max_results: Optional[
        "capo_cloudformation.types.resource_scanner_max_results.ResourceScannerMaxResults"
    ] = None,
    scan_type_filter: Optional[
        "capo_cloudformation.types.scan_type.ScanType"
    ] = None,
) -> "capo_cloudformation.types.list_resource_scans_output.ListResourceScansOutput":
    """<p>List the resource scans from newest to oldest. By default it will return up to 10 resource scans.</p>

    Args:
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
        max_results: <p>If the number of available results exceeds this maximum, the response includes a <code>NextToken</code> value that you can use for the <code>NextToken</code> parameter to get the next set of results. The default value is 10. The maximum value is 100.</p>
        scan_type_filter: <p>The scan type that you want to get summary information about. The default is <code>FULL</code>.</p>

    Raises:
        capo_cloudformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudformation.types.list_resource_scans_input.ListResourceScansInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudformation.types.list_resource_scans_output.ListResourceScansOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.list_resource_scans

        (
            output,
            http_response,
        ) = await capo_cloudformation._operations.cloud_formation.list_resource_scans.async_list_resource_scans(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListResourceScans")
    )
    input_: capo_cloudformation.types.list_resource_scans_input.ListResourceScansInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if scan_type_filter is not None:
        input_["scan_type_filter"] = scan_type_filter

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