Retrieves aggregated statistics for your account. If you are a GuardDuty administrator, you can retrieve the statistics for all the resources associated with the active member accounts in your organization who have enabled Runtime Monitoring and have the GuardDuty security agent running on their resources.
Parameters:
-
detector_id
(DetectorId)
–
The unique ID of the GuardDuty detector.
To find the detectorId in the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API.
-
filter_criteria
(Optional[CoverageFilterCriteria], default:
None
)
–
Represents the criteria used to filter the coverage statistics.
-
statistics_type
(Optional[CoverageStatisticsTypeList], default:
None
)
–
Represents the statistics type used to aggregate the coverage details.
Raises:
Source code in docs_src/capo_guardduty/_services/async_guard_duty.py
| async def get_coverage_statistics(
self,
detector_id: "capo_guardduty.types.detector_id.DetectorId",
*,
config_overrides: Optional[AsyncGuardDutyClientConfig] = None,
filter_criteria: Optional[
"capo_guardduty.types.coverage_filter_criteria.CoverageFilterCriteria"
] = None,
statistics_type: Optional[
"capo_guardduty.types.coverage_statistics_type_list.CoverageStatisticsTypeList"
] = None,
) -> "capo_guardduty.types.get_coverage_statistics_response.GetCoverageStatisticsResponse":
"""<p>Retrieves aggregated statistics for your account. If you are a GuardDuty administrator, you can retrieve the statistics for all the resources associated with the active member accounts in your organization who have enabled Runtime Monitoring and have the GuardDuty security agent running on their resources.</p>
Args:
detector_id: <p>The unique ID of the GuardDuty detector.</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>
filter_criteria: <p>Represents the criteria used to filter the coverage statistics.</p>
statistics_type: <p>Represents the statistics type used to aggregate the coverage details.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_guardduty.types.get_coverage_statistics_request.GetCoverageStatisticsRequest]",
) -> AsyncOperationResponse[
"capo_guardduty.types.get_coverage_statistics_response.GetCoverageStatisticsResponse"
]:
import capo_guardduty._operations.guard_duty_api_service.get_coverage_statistics
(
output,
http_response,
) = await capo_guardduty._operations.guard_duty_api_service.get_coverage_statistics.async_get_coverage_statistics(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetCoverageStatistics")
)
input_: capo_guardduty.types.get_coverage_statistics_request.GetCoverageStatisticsRequest = {
"detector_id": detector_id
}
if filter_criteria is not None:
input_["filter_criteria"] = filter_criteria
if statistics_type is not None:
input_["statistics_type"] = statistics_type
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|