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
3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 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 | |