Skip to main content

usage_statistics

Creates, updates, deletes, gets or lists a usage_statistics resource.

Overview

Nameusage_statistics
TypeResource
Idaws.guardduty.usage_statistics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
sum_by_accountarrayThe usage statistic sum organized by account ID.
sum_by_data_sourcearrayThe usage statistic sum organized by on data source.
sum_by_featurearrayThe usage statistic sum organized by feature.
sum_by_resourcearrayThe usage statistic sum organized by resource.
top_accounts_by_featurearrayLists the top 50 accounts by feature that have generated the most GuardDuty usage, in the order from most to least expensive. Currently, this doesn't support RDS_LOGIN_EVENTS.
top_resourcesarrayLists the top 50 resources that have generated the most GuardDuty usage, in order from most to least expensive.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_usage_statisticsselectdetector_id, regionLists 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

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
detector_idstringThe 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.
regionstringAWS region (default: us-east-1)

SELECT examples

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.

SELECT
sum_by_account,
sum_by_data_source,
sum_by_feature,
sum_by_resource,
top_accounts_by_feature,
top_resources
FROM aws.guardduty.usage_statistics
WHERE detector_id = '{{ detector_id }}' -- required
AND region = '{{ region }}' -- required
;