Skip to content

Get Usage Statistics

guardduty_get_usage_statistics R Documentation

Lists Amazon GuardDuty usage statistics over the last 30 days for the specified detector ID

Description

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.

Usage

guardduty_get_usage_statistics(DetectorId, UsageStatisticType,
  UsageCriteria, Unit, MaxResults, NextToken)

Arguments

DetectorId

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

UsageStatisticType

[required] The type of usage statistics to retrieve.

UsageCriteria

[required] Represents the criteria used for querying usage.

Unit

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

MaxResults

The maximum number of results to return in the response.

NextToken

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.

Value

A list with the following syntax:

list(
  UsageStatistics = list(
    SumByAccount = list(
      list(
        AccountId = "string",
        Total = list(
          Amount = "string",
          Unit = "string"
        )
      )
    ),
    TopAccountsByFeature = list(
      list(
        Feature = "FLOW_LOGS"|"CLOUD_TRAIL"|"DNS_LOGS"|"S3_DATA_EVENTS"|"EKS_AUDIT_LOGS"|"EBS_MALWARE_PROTECTION"|"RDS_LOGIN_EVENTS"|"LAMBDA_NETWORK_LOGS"|"EKS_RUNTIME_MONITORING"|"FARGATE_RUNTIME_MONITORING"|"EC2_RUNTIME_MONITORING"|"RDS_DBI_PROTECTION_PROVISIONED"|"RDS_DBI_PROTECTION_SERVERLESS",
        Accounts = list(
          list(
            AccountId = "string",
            Total = list(
              Amount = "string",
              Unit = "string"
            )
          )
        )
      )
    ),
    SumByDataSource = list(
      list(
        DataSource = "FLOW_LOGS"|"CLOUD_TRAIL"|"DNS_LOGS"|"S3_LOGS"|"KUBERNETES_AUDIT_LOGS"|"EC2_MALWARE_SCAN",
        Total = list(
          Amount = "string",
          Unit = "string"
        )
      )
    ),
    SumByResource = list(
      list(
        Resource = "string",
        Total = list(
          Amount = "string",
          Unit = "string"
        )
      )
    ),
    TopResources = list(
      list(
        Resource = "string",
        Total = list(
          Amount = "string",
          Unit = "string"
        )
      )
    ),
    SumByFeature = list(
      list(
        Feature = "FLOW_LOGS"|"CLOUD_TRAIL"|"DNS_LOGS"|"S3_DATA_EVENTS"|"EKS_AUDIT_LOGS"|"EBS_MALWARE_PROTECTION"|"RDS_LOGIN_EVENTS"|"LAMBDA_NETWORK_LOGS"|"EKS_RUNTIME_MONITORING"|"FARGATE_RUNTIME_MONITORING"|"EC2_RUNTIME_MONITORING"|"RDS_DBI_PROTECTION_PROVISIONED"|"RDS_DBI_PROTECTION_SERVERLESS",
        Total = list(
          Amount = "string",
          Unit = "string"
        )
      )
    )
  ),
  NextToken = "string"
)

Request syntax

svc$get_usage_statistics(
  DetectorId = "string",
  UsageStatisticType = "SUM_BY_ACCOUNT"|"SUM_BY_DATA_SOURCE"|"SUM_BY_RESOURCE"|"TOP_RESOURCES"|"SUM_BY_FEATURES"|"TOP_ACCOUNTS_BY_FEATURE",
  UsageCriteria = list(
    AccountIds = list(
      "string"
    ),
    DataSources = list(
      "FLOW_LOGS"|"CLOUD_TRAIL"|"DNS_LOGS"|"S3_LOGS"|"KUBERNETES_AUDIT_LOGS"|"EC2_MALWARE_SCAN"
    ),
    Resources = list(
      "string"
    ),
    Features = list(
      "FLOW_LOGS"|"CLOUD_TRAIL"|"DNS_LOGS"|"S3_DATA_EVENTS"|"EKS_AUDIT_LOGS"|"EBS_MALWARE_PROTECTION"|"RDS_LOGIN_EVENTS"|"LAMBDA_NETWORK_LOGS"|"EKS_RUNTIME_MONITORING"|"FARGATE_RUNTIME_MONITORING"|"EC2_RUNTIME_MONITORING"|"RDS_DBI_PROTECTION_PROVISIONED"|"RDS_DBI_PROTECTION_SERVERLESS"
    )
  ),
  Unit = "string",
  MaxResults = 123,
  NextToken = "string"
)