get_usage_statistics¶
Operation¶
get_usage_statistics
¶
get_usage_statistics(request: GetUsageStatisticsInput | GetUsageStatisticsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetUsageStatisticsInputDict]) -> 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 |
|---|---|---|---|
request
|
GetUsageStatisticsInput | GetUsageStatisticsInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetUsageStatisticsInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetUsageStatisticsOutput
|
An instance of |
get_usage_statistics
async
¶
get_usage_statistics(request: GetUsageStatisticsInput | GetUsageStatisticsInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetUsageStatisticsInputDict]) -> 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 |
|---|---|---|---|
request
|
GetUsageStatisticsInput | GetUsageStatisticsInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
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
|
**kwargs
|
Unpack[GetUsageStatisticsInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetUsageStatisticsOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
GetUsageStatisticsInputDict
¶
Bases: TypedDict
Dictionary form of GetUsageStatisticsInput.
Attributes¶
detector_id
instance-attribute
¶
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
instance-attribute
¶
max_results: int | None
The maximum number of results to return in the response.
next_token
instance-attribute
¶
next_token: str | 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
instance-attribute
¶
unit: str | None
The currency unit you would like to view your usage statistics in. Current valid values are USD.
usage_criteria
instance-attribute
¶
usage_criteria: Required[UsageCriteria | UsageCriteriaDict]
Represents the criteria used for querying usage.
GetUsageStatisticsInput
dataclass
¶
Bases: _SerdeShape
Dataclass for GetUsageStatisticsInput structure.
Attributes¶
detector_id
class-attribute
instance-attribute
¶
detector_id: str | 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 = ...
The maximum number of results to return in the response.
next_token
class-attribute
instance-attribute
¶
next_token: str | 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 = ...
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 = ...
Represents the criteria used for querying usage.
Output¶
GetUsageStatisticsOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for GetUsageStatisticsOutput structure.
Attributes¶
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
The pagination parameter to be used on the next list operation to retrieve more items.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
usage_statistics
class-attribute
instance-attribute
¶
usage_statistics: UsageStatistics | None = ...
The usage statistics object. If a UsageStatisticType was provided, the objects representing other types will be null.