usage_statistics
Creates, updates, deletes, gets or lists a usage_statistics resource.
Overview
| Name | usage_statistics |
| Type | Resource |
| Id | aws.guardduty.usage_statistics |
Fields
The following fields are returned by SELECT queries:
- get_usage_statistics
| Name | Datatype | Description |
|---|---|---|
sum_by_account | array | The usage statistic sum organized by account ID. |
sum_by_data_source | array | The usage statistic sum organized by on data source. |
sum_by_feature | array | The usage statistic sum organized by feature. |
sum_by_resource | array | The usage statistic sum organized by resource. |
top_accounts_by_feature | array | Lists 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_resources | array | Lists 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_usage_statistics | select | detector_id, region | 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
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.
| Name | Datatype | Description |
|---|---|---|
detector_id | string | 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. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_usage_statistics
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
;