Skip to content

Get Usage Statistics

macie2_get_usage_statistics R Documentation

Retrieves (queries) quotas and aggregated usage data for one or more accounts

Description

Retrieves (queries) quotas and aggregated usage data for one or more accounts.

Usage

macie2_get_usage_statistics(filterBy, maxResults, nextToken, sortBy,
  timeRange)

Arguments

filterBy

An array of objects, one for each condition to use to filter the query results. If you specify more than one condition, Amazon Macie uses an AND operator to join the conditions.

maxResults

The maximum number of items to include in each page of the response.

nextToken

The nextToken string that specifies which page of results to return in a paginated response.

sortBy

The criteria to use to sort the query results.

timeRange

The inclusive time period to query usage data for. Valid values are: MONTH_TO_DATE, for the current calendar month to date; and, PAST_30_DAYS, for the preceding 30 days. If you don't specify a value, Amazon Macie provides usage data for the preceding 30 days.

Value

A list with the following syntax:

list(
  nextToken = "string",
  records = list(
    list(
      accountId = "string",
      automatedDiscoveryFreeTrialStartDate = as.POSIXct(
        "2015-01-01"
      ),
      freeTrialStartDate = as.POSIXct(
        "2015-01-01"
      ),
      usage = list(
        list(
          currency = "USD",
          estimatedCost = "string",
          serviceLimit = list(
            isServiceLimited = TRUE|FALSE,
            unit = "TERABYTES",
            value = 123
          ),
          type = "DATA_INVENTORY_EVALUATION"|"SENSITIVE_DATA_DISCOVERY"|"AUTOMATED_SENSITIVE_DATA_DISCOVERY"|"AUTOMATED_OBJECT_MONITORING"
        )
      )
    )
  ),
  timeRange = "MONTH_TO_DATE"|"PAST_30_DAYS"
)

Request syntax

svc$get_usage_statistics(
  filterBy = list(
    list(
      comparator = "GT"|"GTE"|"LT"|"LTE"|"EQ"|"NE"|"CONTAINS",
      key = "accountId"|"serviceLimit"|"freeTrialStartDate"|"total",
      values = list(
        "string"
      )
    )
  ),
  maxResults = 123,
  nextToken = "string",
  sortBy = list(
    key = "accountId"|"total"|"serviceLimitValue"|"freeTrialStartDate",
    orderBy = "ASC"|"DESC"
  ),
  timeRange = "MONTH_TO_DATE"|"PAST_30_DAYS"
)