GetUsageStatistics

class Macie2.Paginator.GetUsageStatistics
paginator = client.get_paginator('get_usage_statistics')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Macie2.Client.get_usage_statistics().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    filterBy=[
        {
            'comparator': 'GT'|'GTE'|'LT'|'LTE'|'EQ'|'NE'|'CONTAINS',
            'key': 'accountId'|'serviceLimit'|'freeTrialStartDate'|'total',
            'values': [
                'string',
            ]
        },
    ],
    sortBy={
        'key': 'accountId'|'total'|'serviceLimitValue'|'freeTrialStartDate',
        'orderBy': 'ASC'|'DESC'
    },
    timeRange='MONTH_TO_DATE'|'PAST_30_DAYS',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • filterBy (list) --

    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.

    • (dict) --

      Specifies a condition for filtering the results of a query for quota and usage data for one or more Amazon Macie accounts.

      • comparator (string) --

        The operator to use in the condition. If the value for the key property is accountId, this value must be CONTAINS. If the value for the key property is any other supported field, this value can be EQ, GT, GTE, LT, LTE, or NE.

      • key (string) --

        The field to use in the condition.

      • values (list) --

        An array that lists values to use in the condition, based on the value for the field specified by the key property. If the value for the key property is accountId, this array can specify multiple values. Otherwise, this array can specify only one value.

        Valid values for each supported field are:

        • accountId - The unique identifier for an Amazon Web Services account.
        • freeTrialStartDate - The date and time, in UTC and extended ISO 8601 format, when the Amazon Macie free trial started for an account.
        • serviceLimit - A Boolean (true or false) value that indicates whether an account has reached its monthly quota.
        • total - A string that represents the current estimated cost for an account.
        • (string) --
  • sortBy (dict) --

    The criteria to use to sort the query results.

    • key (string) --

      The field to sort the results by.

    • orderBy (string) --

      The sort order to apply to the results, based on the value for the field specified by the key property. Valid values are: ASC, sort the results in ascending order; and, DESC, sort the results in descending order.

  • timeRange (string) -- 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.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'records': [
        {
            'accountId': 'string',
            'automatedDiscoveryFreeTrialStartDate': datetime(2015, 1, 1),
            'freeTrialStartDate': datetime(2015, 1, 1),
            'usage': [
                {
                    'currency': 'USD',
                    'estimatedCost': 'string',
                    'serviceLimit': {
                        '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',
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    The request succeeded.

    • records (list) --

      An array of objects that contains the results of the query. Each object contains the data for an account that matches the filter criteria specified in the request.

      • (dict) --

        Provides quota and aggregated usage data for an Amazon Macie account.

        • accountId (string) --

          The unique identifier for the Amazon Web Services account that the data applies to.

        • automatedDiscoveryFreeTrialStartDate (datetime) --

          The date and time, in UTC and extended ISO 8601 format, when the free trial of automated sensitive data discovery started for the account. If the account is a member account in an organization, this value is the same as the value for the organization's Amazon Macie administrator account.

        • freeTrialStartDate (datetime) --

          The date and time, in UTC and extended ISO 8601 format, when the Amazon Macie free trial started for the account.

        • usage (list) --

          An array of objects that contains usage data and quotas for the account. Each object contains the data for a specific usage metric and the corresponding quota.

          • (dict) --

            Provides data for a specific usage metric and the corresponding quota for an Amazon Macie account.

            • currency (string) --

              The type of currency that the value for the metric (estimatedCost) is reported in.

            • estimatedCost (string) --

              The estimated value for the metric.

            • serviceLimit (dict) --

              The current value for the quota that corresponds to the metric specified by the type field.

              • isServiceLimited (boolean) --

                Specifies whether the account has met the quota that corresponds to the metric specified by the UsageByAccount.type field in the response.

              • unit (string) --

                The unit of measurement for the value specified by the value field.

              • value (integer) --

                The value for the metric specified by the UsageByAccount.type field in the response.

            • type (string) --

              The name of the metric. Possible values are: AUTOMATED_OBJECT_MONITORING, to monitor S3 objects for automated sensitive data discovery; AUTOMATED_SENSITIVE_DATA_DISCOVERY, to analyze S3 objects for automated sensitive data discovery; DATA_INVENTORY_EVALUATION, to monitor S3 buckets; and, SENSITIVE_DATA_DISCOVERY, to run classification jobs.

    • timeRange (string) --

      The inclusive time period that the usage data applies to. Possible values are: MONTH_TO_DATE, for the current calendar month to date; and, PAST_30_DAYS, for the preceding 30 days.

    • NextToken (string) --

      A token to resume pagination.