Skip to content

describe_malware_scans

describe_malware_scans(
    detector_id: DetectorId,
    *,
    config_overrides: Optional[GuardDutyClientConfig] = None,
    next_token: Optional[String] = None,
    max_results: Optional[IntegerValueWithMax] = None,
    filter_criteria: Optional[FilterCriteria] = None,
    sort_criteria: Optional[SortCriteria] = None,
) -> DescribeMalwareScansResponse

Returns a list of malware scans. Each member account can view the malware scans for their own accounts. An administrator can view the malware scans for all the member accounts.

There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see Regions and endpoints.

Parameters:

  • detector_id (DetectorId) –

    The unique ID of the detector that the request is associated with.

    To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.

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

    You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the list action. For subsequent calls to the action, fill nextToken in the request with the value of NextToken from the previous response to continue listing data.

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

    You can use this parameter to indicate the maximum number of items that you want in the response. The default value is 50. The maximum value is 50.

  • filter_criteria (Optional[FilterCriteria], default: None ) –

    Represents the criteria to be used in the filter for describing scan entries.

  • sort_criteria (Optional[SortCriteria], default: None ) –

    Represents the criteria used for sorting scan entries. The attributeName is required and it must be scanStartTime.

Raises:

Source code in docs_src/capo_guardduty/_services/guard_duty.py
def describe_malware_scans(
    self,
    detector_id: "capo_guardduty.types.detector_id.DetectorId",
    *,
    config_overrides: Optional[GuardDutyClientConfig] = None,
    next_token: Optional["capo_guardduty.types.string.String"] = None,
    max_results: Optional[
        "capo_guardduty.types.integer_value_with_max.IntegerValueWithMax"
    ] = None,
    filter_criteria: Optional[
        "capo_guardduty.types.filter_criteria.FilterCriteria"
    ] = None,
    sort_criteria: Optional[
        "capo_guardduty.types.sort_criteria.SortCriteria"
    ] = None,
) -> "capo_guardduty.types.describe_malware_scans_response.DescribeMalwareScansResponse":
    """<p>Returns a list of malware scans. Each member account can view the malware scans for their own accounts. An administrator can view the malware scans for all the member accounts.</p> <p>There might be regional differences because some data sources might not be available in all the Amazon Web Services Regions where GuardDuty is presently supported. For more information, see <a href="https://docs.aws.amazon.com/guardduty/latest/ug/guardduty_regions.html">Regions and endpoints</a>.</p>

    Args:
        detector_id: <p>The unique ID of the detector that the request is associated with.</p> <p>To find the <code>detectorId</code> in the current Region, see the Settings page in the GuardDuty console, or run the <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html">ListDetectors</a> API.</p>
        next_token: <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the list action. For subsequent calls to the action, fill nextToken in the request with the value of NextToken from the previous response to continue listing data.</p>
        max_results: <p>You can use this parameter to indicate the maximum number of items that you want in the response. The default value is 50. The maximum value is 50.</p>
        filter_criteria: <p>Represents the criteria to be used in the filter for describing scan entries.</p>
        sort_criteria: <p>Represents the criteria used for sorting scan entries. The <a href="https://docs.aws.amazon.com/guardduty/latest/APIReference/API_SortCriteria.html#guardduty-Type-SortCriteria-attributeName"> <code>attributeName</code> </a> is required and it must be <code>scanStartTime</code>.</p>

    Raises:
        capo_guardduty.errors.bad_request_exception.BadRequestException: <p>A bad request exception object.</p>
        capo_guardduty.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error exception object.</p>
        capo_guardduty.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_guardduty.types.describe_malware_scans_request.DescribeMalwareScansRequest]",
    ) -> OperationResponse[
        "capo_guardduty.types.describe_malware_scans_response.DescribeMalwareScansResponse"
    ]:
        import capo_guardduty._operations.guard_duty_api_service.describe_malware_scans

        output, http_response = (
            capo_guardduty._operations.guard_duty_api_service.describe_malware_scans.describe_malware_scans(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeMalwareScans")
    )
    input_: capo_guardduty.types.describe_malware_scans_request.DescribeMalwareScansRequest = {
        "detector_id": detector_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if filter_criteria is not None:
        input_["filter_criteria"] = filter_criteria
    if sort_criteria is not None:
        input_["sort_criteria"] = sort_criteria

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output