Skip to content

Guardduty  >  Operations  >  get_usage_statistics

get_usage_statistics

Operation

get_usage_statistics async

get_usage_statistics(input: GetUsageStatisticsInput, plugins: list[Plugin] | None = None) -> GetUsageStatisticsOutput

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:

Name Type Description Default
input GetUsageStatisticsInput

An instance of GetUsageStatisticsInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetUsageStatisticsOutput

An instance of GetUsageStatisticsOutput.

Input

GetUsageStatisticsInput dataclass

Dataclass for GetUsageStatisticsInput structure.

Attributes

detector_id class-attribute instance-attribute
detector_id: str | None = None

The ID of the detector that specifies the GuardDuty service whose usage statistics you want to retrieve.

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

max_results class-attribute instance-attribute
max_results: int | None = None

The maximum number of results to return in the response.

next_token class-attribute instance-attribute
next_token: str | None = 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.

unit class-attribute instance-attribute
unit: str | None = None

The currency unit you would like to view your usage statistics in. Current valid values are USD.

usage_criteria class-attribute instance-attribute
usage_criteria: UsageCriteria | None = None

Represents the criteria used for querying usage.

usage_statistic_type class-attribute instance-attribute
usage_statistic_type: UsageStatisticType | None = None

The type of usage statistics to retrieve.

Output

GetUsageStatisticsOutput dataclass

Dataclass for GetUsageStatisticsOutput structure.

Attributes

next_token class-attribute instance-attribute
next_token: str | None = None

The pagination parameter to be used on the next list operation to retrieve more items.

usage_statistics class-attribute instance-attribute
usage_statistics: UsageStatistics | None = None

The usage statistics object. If a UsageStatisticType was provided, the objects representing other types will be null.