get_resource_profile

get_resource_profile(**kwargs)

Retrieves (queries) sensitive data discovery statistics and the sensitivity score for an S3 bucket.

See also: AWS API Documentation

Request Syntax

response = client.get_resource_profile(
    resourceArn='string'
)
Parameters
resourceArn (string) --

[REQUIRED]

The Amazon Resource Name (ARN) of the S3 bucket that the request applies to.

Return type
dict
Returns
Response Syntax
{
    'profileUpdatedAt': datetime(2015, 1, 1),
    'sensitivityScore': 123,
    'sensitivityScoreOverridden': True|False,
    'statistics': {
        'totalBytesClassified': 123,
        'totalDetections': 123,
        'totalDetectionsSuppressed': 123,
        'totalItemsClassified': 123,
        'totalItemsSensitive': 123,
        'totalItemsSkipped': 123,
        'totalItemsSkippedInvalidEncryption': 123,
        'totalItemsSkippedInvalidKms': 123,
        'totalItemsSkippedPermissionDenied': 123
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • profileUpdatedAt (datetime) --

      The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently recalculated sensitive data discovery statistics and details for the bucket. If the bucket's sensitivity score is calculated automatically, this includes the score.

    • sensitivityScore (integer) --

      The current sensitivity score for the bucket, ranging from -1 (classification error) to 100 (sensitive). By default, this score is calculated automatically based on the amount of data that Amazon Macie has analyzed in the bucket and the amount of sensitive data that Macie has found in the bucket.

    • sensitivityScoreOverridden (boolean) --

      Specifies whether the bucket's current sensitivity score was set manually. If this value is true, the score was manually changed to 100. If this value is false, the score was calculated automatically by Amazon Macie.

    • statistics (dict) --

      The sensitive data discovery statistics for the bucket. The statistics capture the results of automated sensitive data discovery activities that Amazon Macie has performed for the bucket.

      • totalBytesClassified (integer) --

        The total amount of data, in bytes, that Amazon Macie has analyzed in the bucket.

      • totalDetections (integer) --

        The total number of occurrences of sensitive data that Amazon Macie has found in the bucket's objects. This includes occurrences that are currently suppressed by the sensitivity scoring settings for the bucket (totalDetectionsSuppressed).

      • totalDetectionsSuppressed (integer) --

        The total number of occurrences of sensitive data that are currently suppressed by the sensitivity scoring settings for the bucket. These represent occurrences of sensitive data that Amazon Macie found in the bucket's objects, but the occurrences were manually suppressed. By default, suppressed occurrences are excluded from the bucket's sensitivity score.

      • totalItemsClassified (integer) --

        The total number of objects that Amazon Macie has analyzed in the bucket.

      • totalItemsSensitive (integer) --

        The total number of the bucket's objects that Amazon Macie has found sensitive data in.

      • totalItemsSkipped (integer) --

        The total number of objects that Amazon Macie hasn't analyzed in the bucket due to an error or issue. For example, the object is a malformed file. This value includes objects that Macie hasn't analyzed for reasons reported by other statistics in the ResourceStatistics object.

      • totalItemsSkippedInvalidEncryption (integer) --

        The total number of objects that Amazon Macie hasn't analyzed in the bucket because the objects are encrypted with a key that Macie isn't allowed to use.

      • totalItemsSkippedInvalidKms (integer) --

        The total number of objects that Amazon Macie hasn't analyzed in the bucket because the objects are encrypted with an KMS key that was disabled or deleted.

      • totalItemsSkippedPermissionDenied (integer) --

        The total number of objects that Amazon Macie hasn't analyzed in the bucket because Macie isn't allowed to access the objects.

Exceptions

  • Macie2.Client.exceptions.ValidationException
  • Macie2.Client.exceptions.InternalServerException
  • Macie2.Client.exceptions.ServiceQuotaExceededException
  • Macie2.Client.exceptions.AccessDeniedException
  • Macie2.Client.exceptions.ResourceNotFoundException
  • Macie2.Client.exceptions.ThrottlingException