get_usage_statistics
async
¶
get_usage_statistics(
detector_id: DetectorId,
*,
config_overrides: Optional[AsyncGuardDutyClientConfig] = 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/async_guard_duty.py
3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 | |