get_usage_statistics
¶
get_usage_statistics(
detector_id: DetectorId,
*,
config_overrides: Optional[GuardDutyClientConfig] = None,
usage_statistic_type: Optional[UsageStatisticType] = None,
usage_criteria: Optional[UsageCriteria] = None,
unit: Optional[String] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[String] = None,
) -> GetUsageStatisticsResponse
Lists Amazon GuardDuty usage statistics over the last 30 days for the specified detector ID. For newly enabled detectors or data sources, the cost returned will include only the usage so far under 30 days. This may differ from the cost metrics in the console, which project usage over 30 days to provide a monthly cost estimate. For more information, see Understanding How Usage Costs are Calculated.
Parameters:
-
detector_id(DetectorId) –The ID of the detector that specifies the GuardDuty service whose usage statistics you want to retrieve.
To find the
detectorIdin the current Region, see the Settings page in the GuardDuty console, or run the ListDetectors API. -
usage_statistic_type(Optional[UsageStatisticType], default:None) –The type of usage statistics to retrieve.
-
usage_criteria(Optional[UsageCriteria], default:None) –Represents the criteria used for querying usage.
-
unit(Optional[String], default:None) –The currency unit you would like to view your usage statistics in. Current valid values are USD.
-
max_results(Optional[MaxResults], default:None) –The maximum number of results to return in the response.
-
next_token(Optional[String], default:None) –A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. For subsequent calls, use the NextToken value returned from the previous request to continue listing results after the first page.
Raises:
-
BadRequestException–A bad request exception object.
-
InternalServerErrorException–An internal server error exception object.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_guardduty/_services/guard_duty.py
3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 | |