list_usage_totals

list_usage_totals(**kwargs)

Lists the Amazon Inspector usage totals over the last 30 days.

See also: AWS API Documentation

Request Syntax

response = client.list_usage_totals(
    accountIds=[
        'string',
    ],
    maxResults=123,
    nextToken='string'
)
Parameters
  • accountIds (list) --

    The Amazon Web Services account IDs to retrieve usage totals for.

    • (string) --
  • maxResults (integer) -- The maximum number of results to return in the response.
  • nextToken (string) -- 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.
Return type

dict

Returns

Response Syntax

{
    'nextToken': 'string',
    'totals': [
        {
            'accountId': 'string',
            'usage': [
                {
                    'currency': 'USD',
                    'estimatedMonthlyCost': 123.0,
                    'total': 123.0,
                    'type': 'EC2_INSTANCE_HOURS'|'ECR_INITIAL_SCAN'|'ECR_RESCAN'|'LAMBDA_FUNCTION_HOURS'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      The pagination parameter to be used on the next list operation to retrieve more items.

    • totals (list) --

      An object with details on the total usage for the requested account.

      • (dict) --

        The total of usage for an account ID.

        • accountId (string) --

          The account ID of the account that usage data was retrieved for.

        • usage (list) --

          An object representing the total usage for an account.

          • (dict) --

            Contains usage information about the cost of Amazon Inspector operation.

            • currency (string) --

              The currency type used when calculating usage data.

            • estimatedMonthlyCost (float) --

              The estimated monthly cost of Amazon Inspector.

            • total (float) --

              The total of usage.

            • type (string) --

              The type scan.

Exceptions

  • Inspector2.Client.exceptions.ValidationException
  • Inspector2.Client.exceptions.AccessDeniedException
  • Inspector2.Client.exceptions.ThrottlingException
  • Inspector2.Client.exceptions.InternalServerException