Usage Totals - Amazon Macie

Usage Totals

The Usage Totals resource provides aggregated usage data for your Amazon Macie account. This data can provide insight into the estimated cost of using Macie to monitor and analyze your Amazon Simple Storage Service (Amazon S3) data.

You can use this resource to retrieve (query) aggregated usage data for your Macie account for the preceding 30 days or the current calendar month to date. If you're a user of a Macie administrator account, the data reports cumulative usage for all the member accounts in your organization. To query additional usage-related data or build a custom query for a select set of accounts, use the Usage Statistics resource.

For information about how Macie calculates usage data for your account, see Monitoring and forecasting costs in the Amazon Macie User Guide.

URI

/usage

HTTP methods

GET

Operation ID: GetUsageTotals

Retrieves (queries) aggregated usage data for an account.

Query parameters
Name Type Required Description
timeRange String False

The inclusive time period to retrieve the 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 for this parameter, Amazon Macie provides aggregated usage data for the preceding 30 days.

Responses
Status code Response model Description
200 GetUsageTotalsResponse

The request succeeded.

400 ValidationException

The request failed because it contains a syntax error.

402 ServiceQuotaExceededException

The request failed because fulfilling the request would exceed one or more service quotas for your account.

403 AccessDeniedException

The request was denied because you don't have sufficient access to the specified resource.

404 ResourceNotFoundException

The request failed because the specified resource wasn't found.

409 ConflictException

The request failed because it conflicts with the current state of the specified resource.

429 ThrottlingException

The request failed because you sent too many requests during a certain amount of time.

500 InternalServerException

The request failed due to an unknown internal server error, exception, or failure.

Schemas

Response bodies

{ "usageTotals": [ { "currency": enum, "estimatedCost": "string", "type": enum } ], "timeRange": enum }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }
{ "message": "string" }

Properties

AccessDeniedException

Provides information about an error that occurred due to insufficient access to a specified resource.

Property Type Required Description
message

string

False

The explanation of the error that occurred.

ConflictException

Provides information about an error that occurred due to a versioning conflict for a specified resource.

Property Type Required Description
message

string

False

The explanation of the error that occurred.

Currency

The type of currency that the data for an Amazon Macie usage metric is reported in. Possible values are:

  • USD

GetUsageTotalsResponse

Provides the results of a query that retrieved aggregated usage data for an Amazon Macie account.

Property Type Required Description
usageTotals

Array of type UsageTotal

False

An array of objects that contains the results of the query. Each object contains the data for a specific usage metric.

timeRange

TimeRange

False

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.

InternalServerException

Provides information about an error that occurred due to an unknown internal server error, exception, or failure.

Property Type Required Description
message

string

False

The explanation of the error that occurred.

ResourceNotFoundException

Provides information about an error that occurred because a specified resource wasn't found.

Property Type Required Description
message

string

False

The explanation of the error that occurred.

ServiceQuotaExceededException

Provides information about an error that occurred due to one or more service quotas for an account.

Property Type Required Description
message

string

False

The explanation of the error that occurred.

ThrottlingException

Provides information about an error that occurred because too many requests were sent during a certain amount of time.

Property Type Required Description
message

string

False

The explanation of the error that occurred.

TimeRange

An inclusive time period that Amazon Macie usage data applies to. Possible values are:

  • MONTH_TO_DATE

  • PAST_30_DAYS

UsageTotal

Provides aggregated data for an Amazon Macie usage metric. The value for the metric reports estimated usage data for an account for the preceding 30 days or the current calendar month to date, depending on the time period (timeRange) specified in the request.

Property Type Required Description
currency

Currency

False

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

estimatedCost

string

False

The estimated value for the metric.

type

UsageType

False

The name of the metric. Possible values are: DATA_INVENTORY_EVALUATION, for monitoring S3 buckets; and, SENSITIVE_DATA_DISCOVERY, for analyzing S3 objects to detect sensitive data.

UsageType

The name of an Amazon Macie usage metric for an account. Possible values are:

  • DATA_INVENTORY_EVALUATION

  • SENSITIVE_DATA_DISCOVERY

ValidationException

Provides information about an error that occurred due to a syntax error in a request.

Property Type Required Description
message

string

False

The explanation of the error that occurred.

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

GetUsageTotals