Skip to content

list_scan_job_summaries async

list_scan_job_summaries(
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    account_id: Optional[AccountId] = None,
    resource_type: Optional[ResourceType] = None,
    malware_scanner: Optional[MalwareScanner] = None,
    scan_result_status: Optional[ScanResultStatus] = None,
    state: Optional[ScanJobStatus] = None,
    aggregation_period: Optional[AggregationPeriod] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[string] = None,
) -> ListScanJobSummariesOutput

This is a request for a summary of scan jobs created or running within the most recent 14 days.

Parameters:

  • account_id (Optional[AccountId], default: None ) –

    Returns the job count for the specified account.

    If the request is sent from a member account or an account not part of Amazon Web Services Organizations, jobs within requestor's account will be returned.

    Root, admin, and delegated administrator accounts can use the value ANY to return job counts from every account in the organization.

    AGGREGATE_ALL aggregates job counts from all accounts within the authenticated organization, then returns the sum.

  • resource_type (Optional[ResourceType], default: None ) –

    Returns the job count for the specified resource type. Use request GetSupportedResourceTypes to obtain strings for supported resource types.

    The the value ANY returns count of all resource types.

    AGGREGATE_ALL aggregates job counts for all resource types and returns the sum.

  • malware_scanner (Optional[MalwareScanner], default: None ) –

    Returns only the scan jobs for the specified malware scanner. Currently the only MalwareScanner is GUARDDUTY. But the field also supports ANY, and AGGREGATE_ALL.

  • scan_result_status (Optional[ScanResultStatus], default: None ) –

    Returns only the scan jobs for the specified scan results.

  • state (Optional[ScanJobStatus], default: None ) –

    Returns only the scan jobs for the specified scanning job state.

  • aggregation_period (Optional[AggregationPeriod], default: None ) –

    The period for the returned results.

    • ONE_DAYThe daily job count for the prior 1 day.

    • SEVEN_DAYSThe daily job count for the prior 7 days.

    • FOURTEEN_DAYSThe daily job count for the prior 14 days.

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

    The maximum number of items to be returned.

    The value is an integer. Range of accepted values is from 1 to 500.

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

    The next item following a partial list of returned items. For example, if a request is made to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def list_scan_job_summaries(
    self,
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    account_id: Optional["capo_backup.types.account_id.AccountId"] = None,
    resource_type: Optional["capo_backup.types.resource_type.ResourceType"] = None,
    malware_scanner: Optional[
        "capo_backup.types.malware_scanner.MalwareScanner"
    ] = None,
    scan_result_status: Optional[
        "capo_backup.types.scan_result_status.ScanResultStatus"
    ] = None,
    state: Optional["capo_backup.types.scan_job_status.ScanJobStatus"] = None,
    aggregation_period: Optional[
        "capo_backup.types.aggregation_period.AggregationPeriod"
    ] = None,
    max_results: Optional["capo_backup.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_backup.types.string.string"] = None,
) -> "capo_backup.types.list_scan_job_summaries_output.ListScanJobSummariesOutput":
    """<p>This is a request for a summary of scan jobs created or running within the most recent 14 days.</p>

    Args:
        account_id: <p>Returns the job count for the specified account.</p> <p>If the request is sent from a member account or an account not part of Amazon Web Services Organizations, jobs within requestor's account will be returned.</p> <p>Root, admin, and delegated administrator accounts can use the value <code>ANY</code> to return job counts from every account in the organization.</p> <p> <code>AGGREGATE_ALL</code> aggregates job counts from all accounts within the authenticated organization, then returns the sum.</p>
        resource_type: <p>Returns the job count for the specified resource type. Use request <code>GetSupportedResourceTypes</code> to obtain strings for supported resource types.</p> <p>The the value <code>ANY</code> returns count of all resource types.</p> <p> <code>AGGREGATE_ALL</code> aggregates job counts for all resource types and returns the sum.</p>
        malware_scanner: <p>Returns only the scan jobs for the specified malware scanner. Currently the only MalwareScanner is <code>GUARDDUTY</code>. But the field also supports <code>ANY</code>, and <code>AGGREGATE_ALL</code>.</p>
        scan_result_status: <p>Returns only the scan jobs for the specified scan results.</p>
        state: <p>Returns only the scan jobs for the specified scanning job state.</p>
        aggregation_period: <p>The period for the returned results.</p> <ul> <li> <p> <code>ONE_DAY</code>The daily job count for the prior 1 day.</p> </li> <li> <p> <code>SEVEN_DAYS</code>The daily job count for the prior 7 days.</p> </li> <li> <p> <code>FOURTEEN_DAYS</code>The daily job count for the prior 14 days.</p> </li> </ul>
        max_results: <p>The maximum number of items to be returned.</p> <p>The value is an integer. Range of accepted values is from 1 to 500.</p>
        next_token: <p>The next item following a partial list of returned items. For example, if a request is made to return <code>MaxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>

    Raises:
        capo_backup.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
        capo_backup.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request failed due to a temporary failure of the server.</p>
        capo_backup.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup.types.list_scan_job_summaries_input.ListScanJobSummariesInput]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.list_scan_job_summaries_output.ListScanJobSummariesOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.list_scan_job_summaries

        (
            output,
            http_response,
        ) = await capo_backup._operations.cryo_controller_user_manager.list_scan_job_summaries.async_list_scan_job_summaries(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListScanJobSummaries")
    )
    input_: capo_backup.types.list_scan_job_summaries_input.ListScanJobSummariesInput = {}
    if account_id is not None:
        input_["account_id"] = account_id
    if resource_type is not None:
        input_["resource_type"] = resource_type
    if malware_scanner is not None:
        input_["malware_scanner"] = malware_scanner
    if scan_result_status is not None:
        input_["scan_result_status"] = scan_result_status
    if state is not None:
        input_["state"] = state
    if aggregation_period is not None:
        input_["aggregation_period"] = aggregation_period
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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