Findings Statistics - Amazon Macie

Findings Statistics

The Findings Statistics resource provides aggregated statistical data about the findings for your account. This primarily includes data about the total number of findings, grouped by a key value such as severity, finding type, or affected resource. The data is available for all the findings that Amazon Macie stores for your account.

You can use this resource to retrieve (query) aggregated statistical data about findings for your account. To customize and refine your query, you can use supported parameters that specify how to filter, group, and sort the query results.

URI

/findings/statistics

HTTP Methods

POST

Operation ID: GetFindingStatistics

Retrieves (queries) aggregated statistical data about findings.

Responses
Status Code Response Model Description
200 GetFindingStatisticsResponse

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

Request Bodies

Example POST

{ "size": integer, "findingCriteria": { "criterion": { } }, "groupBy": enum, "sortCriteria": { "orderBy": enum, "attributeName": enum } }

Response Bodies

Example GetFindingStatisticsResponse

{ "countsByGroup": [ { "count": integer, "groupKey": "string" } ] }

Example ValidationException

{ "message": "string" }

Example ServiceQuotaExceededException

{ "message": "string" }

Example AccessDeniedException

{ "message": "string" }

Example ResourceNotFoundException

{ "message": "string" }

Example ConflictException

{ "message": "string" }

Example ThrottlingException

{ "message": "string" }

Example InternalServerException

{ "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.

Criterion

Specifies a condition that defines a property, operator, and value to use to filter the results of a query for findings.

Property Type Required Description

*

object

False

CriterionAdditionalProperties

Specifies the operator to use in a property-based condition that filters the results of a query for findings.

Property Type Required Description
lt

integer

Format: int64

False

A less than condition to apply to a specified property value for findings.

gte

integer

Format: int64

False

A greater than or equal to condition to apply to a specified property value for findings.

neq

Array of type string

False

A not equal to condition to apply to a specified property value for findings.

lte

integer

Format: int64

False

A less than or equal to condition to apply to a specified property value for findings.

eq

Array of type string

False

An equal to condition to apply to a specified property value for findings.

gt

integer

Format: int64

False

A greater than condition to apply to a specified property value for findings.

FindingCriteria

Specifies, as a map, one or more property-based conditions that filter the results of a query for findings.

Property Type Required Description
criterion

Criterion

False

A condition that specifies the property, operator, and value to use to filter the results.

FindingStatisticsSortAttributeName

The grouping to sort the results by. Valid values are:

  • groupKey

  • count

FindingStatisticsSortCriteria

Specifies criteria for sorting the results of a query that retrieves aggregated statistical data about findings.

Property Type Required Description
orderBy

string

Values: ASC | DESC

False

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

attributeName

FindingStatisticsSortAttributeName

False

The grouping to sort the results by. Valid values are: count, sort the results by the number of findings in each group of results; and, groupKey, sort the results by the name of each group of results.

GetFindingStatisticsRequest

Specifies criteria for filtering, grouping, sorting, and paginating the results of a query that retrieves aggregated statistical data about findings.

Property Type Required Description
size

integer

Format: int32

False

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

findingCriteria

FindingCriteria

False

The criteria to use to filter the query results.

groupBy

string

Values: resourcesAffected.s3Bucket.name | type | classificationDetails.jobId | severity.description

True

The finding property to use to group the query results. Valid values are:

  • classificationDetails.jobId - The unique identifier for the classification job that produced the finding.

  • resourcesAffected.s3Bucket.name - The name of the S3 bucket that the finding applies to.

  • severity.description - The severity level of the finding, such as High or Medium.

  • type - The type of finding, such as Policy:IAMUser/S3BucketPublic and SensitiveData:S3Object/Personal.

sortCriteria

FindingStatisticsSortCriteria

False

The criteria to use to sort the query results.

GetFindingStatisticsResponse

Provides the results of a query that retrieved aggregated statistical data about findings.

Property Type Required Description
countsByGroup

Array of type GroupCount

False

An array of objects, one for each group of findings that meet the filter criteria specified in the request.

GroupCount

Provides a group of results for a query that retrieved aggregated statistical data about findings.

Property Type Required Description
count

integer

Format: int64

False

The total number of findings in the group of query results.

groupKey

string

False

The name of the property that defines the group in the query results, as specified by the groupBy property in the query request.

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.

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:

GetFindingStatistics