Amazon Macie 2

2020/10/15 - Amazon Macie 2 - 5 updated api methods

Changes  This release of the Amazon Macie API adds support for pausing and resuming classification jobs. Also, sensitive data findings now include location data for up to 15 occurrences of sensitive data.

DescribeClassificationJob (updated) Link ¶
Changes (response)
{'jobStatus': {'USER_PAUSED'},
 'userPausedDetails': {'jobExpiresAt': 'timestamp',
                       'jobImminentExpirationHealthEventArn': 'string',
                       'jobPausedAt': 'timestamp'}}

Retrieves the status and settings for a classification job.

See also: AWS API Documentation

Request Syntax

client.describe_classification_job(
    jobId='string'
)
type jobId

string

param jobId

[REQUIRED]

The unique identifier for the classification job.

rtype

dict

returns

Response Syntax

{
    'clientToken': 'string',
    'createdAt': datetime(2015, 1, 1),
    'customDataIdentifierIds': [
        'string',
    ],
    'description': 'string',
    'initialRun': True|False,
    'jobArn': 'string',
    'jobId': 'string',
    'jobStatus': 'RUNNING'|'PAUSED'|'CANCELLED'|'COMPLETE'|'IDLE'|'USER_PAUSED',
    'jobType': 'ONE_TIME'|'SCHEDULED',
    'lastRunTime': datetime(2015, 1, 1),
    'name': 'string',
    's3JobDefinition': {
        'bucketDefinitions': [
            {
                'accountId': 'string',
                'buckets': [
                    'string',
                ]
            },
        ],
        'scoping': {
            'excludes': {
                'and': [
                    {
                        'simpleScopeTerm': {
                            'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS',
                            'key': 'BUCKET_CREATION_DATE'|'OBJECT_EXTENSION'|'OBJECT_LAST_MODIFIED_DATE'|'OBJECT_SIZE'|'TAG',
                            'values': [
                                'string',
                            ]
                        },
                        'tagScopeTerm': {
                            'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS',
                            'key': 'string',
                            'tagValues': [
                                {
                                    'key': 'string',
                                    'value': 'string'
                                },
                            ],
                            'target': 'S3_OBJECT'
                        }
                    },
                ]
            },
            'includes': {
                'and': [
                    {
                        'simpleScopeTerm': {
                            'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS',
                            'key': 'BUCKET_CREATION_DATE'|'OBJECT_EXTENSION'|'OBJECT_LAST_MODIFIED_DATE'|'OBJECT_SIZE'|'TAG',
                            'values': [
                                'string',
                            ]
                        },
                        'tagScopeTerm': {
                            'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS',
                            'key': 'string',
                            'tagValues': [
                                {
                                    'key': 'string',
                                    'value': 'string'
                                },
                            ],
                            'target': 'S3_OBJECT'
                        }
                    },
                ]
            }
        }
    },
    'samplingPercentage': 123,
    'scheduleFrequency': {
        'dailySchedule': {},
        'monthlySchedule': {
            'dayOfMonth': 123
        },
        'weeklySchedule': {
            'dayOfWeek': 'SUNDAY'|'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'
        }
    },
    'statistics': {
        'approximateNumberOfObjectsToProcess': 123.0,
        'numberOfRuns': 123.0
    },
    'tags': {
        'string': 'string'
    },
    'userPausedDetails': {
        'jobExpiresAt': datetime(2015, 1, 1),
        'jobImminentExpirationHealthEventArn': 'string',
        'jobPausedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • clientToken (string) --

      The token that was provided to ensure the idempotency of the request to create the job.

    • createdAt (datetime) --

      The date and time, in UTC and extended ISO 8601 format, when the job was created.

    • customDataIdentifierIds (list) --

      The custom data identifiers that the job uses to analyze data.

      • (string) --

    • description (string) --

      The custom description of the job.

    • initialRun (boolean) --

      Specifies whether the job is configured to analyze all existing, eligible objects immediately after it's created.

    • jobArn (string) --

      The Amazon Resource Name (ARN) of the job.

    • jobId (string) --

      The unique identifier for the job.

    • jobStatus (string) --

      The current status of the job. Possible values are:

      • CANCELLED - You cancelled the job, or you paused the job and didn't resume it within 30 days of pausing it.

      • COMPLETE - For a one-time job, Amazon Macie finished processing all the data specified for the job. This value doesn't apply to recurring jobs.

      • IDLE - For a recurring job, the previous scheduled run is complete and the next scheduled run is pending. This value doesn't apply to one-time jobs.

      • PAUSED - Amazon Macie started running the job but completion of the job would exceed one or more quotas for your account.

      • RUNNING - For a one-time job, the job is in progress. For a recurring job, a scheduled run is in progress.

      • USER_PAUSED - You paused the job. If you don't resume the job within 30 days of pausing it, the job will expire and be cancelled.

    • jobType (string) --

      The schedule for running the job. Possible values are:

      • ONE_TIME - The job runs only once.

      • SCHEDULED - The job runs on a daily, weekly, or monthly basis. The scheduleFrequency property indicates the recurrence pattern for the job.

    • lastRunTime (datetime) --

      The date and time, in UTC and extended ISO 8601 format, when the job last ran.

    • name (string) --

      The custom name of the job.

    • s3JobDefinition (dict) --

      The S3 buckets that the job is configured to analyze, and the scope of that analysis.

      • bucketDefinitions (list) --

        An array of objects, one for each bucket that contains objects to analyze.

        • (dict) --

          Specifies which S3 buckets contain the objects that a classification job analyzes.

          • accountId (string) --

            The unique identifier for the AWS account that owns one or more of the buckets. If specified, the job analyzes objects in all the buckets that are owned by the account and meet other conditions specified for the job.

          • buckets (list) --

            An array that lists the names of the buckets.

            • (string) --

      • scoping (dict) --

        The property- and tag-based conditions that determine which objects to include or exclude from the analysis.

        • excludes (dict) --

          The property- or tag-based conditions that determine which objects to exclude from the analysis.

          • and (list) --

            An array of conditions, one for each condition that determines which objects to include or exclude from the job.

            • (dict) --

              Specifies a property- or tag-based condition that defines criteria for including or excluding objects from a classification job.

              • simpleScopeTerm (dict) --

                A property-based condition that defines a property, operator, and one or more values for including or excluding an object from the job.

                • comparator (string) --

                  The operator to use in the condition. Valid operators for each supported property (key) are:

                  • OBJECT_EXTENSION - EQ (equals) or NE (not equals)

                  • OBJECT_LAST_MODIFIED_DATE - Any operator except CONTAINS

                  • OBJECT_SIZE - Any operator except CONTAINS

                  • TAG - EQ (equals) or NE (not equals)

                • key (string) --

                  The object property to use in the condition.

                • values (list) --

                  An array that lists the values to use in the condition. If the value for the key property is OBJECT_EXTENSION, this array can specify multiple values and Amazon Macie uses an OR operator to join the values. Otherwise, this array can specify only one value. Valid values for each supported property (key) are:

                  • OBJECT_EXTENSION - A string that represents the file name extension of an object. For example: doc, docx, pdf

                  • OBJECT_LAST_MODIFIED_DATE - The date and time (in UTC and extended ISO 8601 format) when an object was created or last changed, whichever is latest. For example: 2020-09-28T14:31:13Z

                  • OBJECT_SIZE - An integer that represents the storage size (in bytes) of an object.

                  • TAG - A string that represents a tag key for an object. For advanced options, use a TagScopeTerm object, instead of a SimpleScopeTerm object, to define a tag-based condition for the job.

                  • (string) --

              • tagScopeTerm (dict) --

                A tag-based condition that defines the operator and tag keys or tag key and value pairs for including or excluding an object from the job.

                • comparator (string) --

                  The operator to use in the condition. Valid operators are EQ (equals) or NE (not equals).

                • key (string) --

                  The tag key to use in the condition.

                • tagValues (list) --

                  The tag keys or tag key and value pairs to use in the condition.

                  • (dict) --

                    Specifies a tag key or tag key and value pair to use in a tag-based condition for a classification job.

                    • key (string) --

                      The value for the tag key to use in the condition.

                    • value (string) --

                      The tag value, associated with the specified tag key (key), to use in the condition. To specify only a tag key for a condition, specify the tag key for the key property and set this value to an empty string.

                • target (string) --

                  The type of object to apply the condition to.

        • includes (dict) --

          The property- or tag-based conditions that determine which objects to include in the analysis.

          • and (list) --

            An array of conditions, one for each condition that determines which objects to include or exclude from the job.

            • (dict) --

              Specifies a property- or tag-based condition that defines criteria for including or excluding objects from a classification job.

              • simpleScopeTerm (dict) --

                A property-based condition that defines a property, operator, and one or more values for including or excluding an object from the job.

                • comparator (string) --

                  The operator to use in the condition. Valid operators for each supported property (key) are:

                  • OBJECT_EXTENSION - EQ (equals) or NE (not equals)

                  • OBJECT_LAST_MODIFIED_DATE - Any operator except CONTAINS

                  • OBJECT_SIZE - Any operator except CONTAINS

                  • TAG - EQ (equals) or NE (not equals)

                • key (string) --

                  The object property to use in the condition.

                • values (list) --

                  An array that lists the values to use in the condition. If the value for the key property is OBJECT_EXTENSION, this array can specify multiple values and Amazon Macie uses an OR operator to join the values. Otherwise, this array can specify only one value. Valid values for each supported property (key) are:

                  • OBJECT_EXTENSION - A string that represents the file name extension of an object. For example: doc, docx, pdf

                  • OBJECT_LAST_MODIFIED_DATE - The date and time (in UTC and extended ISO 8601 format) when an object was created or last changed, whichever is latest. For example: 2020-09-28T14:31:13Z

                  • OBJECT_SIZE - An integer that represents the storage size (in bytes) of an object.

                  • TAG - A string that represents a tag key for an object. For advanced options, use a TagScopeTerm object, instead of a SimpleScopeTerm object, to define a tag-based condition for the job.

                  • (string) --

              • tagScopeTerm (dict) --

                A tag-based condition that defines the operator and tag keys or tag key and value pairs for including or excluding an object from the job.

                • comparator (string) --

                  The operator to use in the condition. Valid operators are EQ (equals) or NE (not equals).

                • key (string) --

                  The tag key to use in the condition.

                • tagValues (list) --

                  The tag keys or tag key and value pairs to use in the condition.

                  • (dict) --

                    Specifies a tag key or tag key and value pair to use in a tag-based condition for a classification job.

                    • key (string) --

                      The value for the tag key to use in the condition.

                    • value (string) --

                      The tag value, associated with the specified tag key (key), to use in the condition. To specify only a tag key for a condition, specify the tag key for the key property and set this value to an empty string.

                • target (string) --

                  The type of object to apply the condition to.

    • samplingPercentage (integer) --

      The sampling depth, as a percentage, that determines the percentage of eligible objects that the job analyzes.

    • scheduleFrequency (dict) --

      The recurrence pattern for running the job. If the job is configured to run only once, this value is null.

      • dailySchedule (dict) --

        Specifies a daily recurrence pattern for running the job.

      • monthlySchedule (dict) --

        Specifies a monthly recurrence pattern for running the job.

        • dayOfMonth (integer) --

          The numeric day of the month when Amazon Macie runs the job. This value can be an integer from 1 through 31.

          If this value exceeds the number of days in a certain month, Macie runs the job on the last day of that month. For example, if this value is 31 and a month has only 30 days, Macie runs the job on day 30 of that month.

      • weeklySchedule (dict) --

        Specifies a weekly recurrence pattern for running the job.

        • dayOfWeek (string) --

          The day of the week when Amazon Macie runs the job.

    • statistics (dict) --

      The number of times that the job has run and processing statistics for the job's current run.

      • approximateNumberOfObjectsToProcess (float) --

        The approximate number of objects that the job has yet to process during its current run.

      • numberOfRuns (float) --

        The number of times that the job has run.

    • tags (dict) --

      A map of key-value pairs that specifies which tags (keys and values) are associated with the classification job.

      • (string) --

        • (string) --

    • userPausedDetails (dict) --

      If the current status of the job is USER_PAUSED, specifies when the job was paused and when the job will expire and be cancelled if it isn't resumed. This value is present only if the value for jobStatus is USER_PAUSED.

      • jobExpiresAt (datetime) --

        The date and time, in UTC and extended ISO 8601 format, when the job will expire and be cancelled if you don't resume it first. If you don't resume a job within 30 days of pausing it, the job expires and Amazon Macie cancels it.

      • jobImminentExpirationHealthEventArn (string) --

        The Amazon Resource Name (ARN) of the AWS Health event that Amazon Macie sent to notify you of the job's pending expiration and cancellation. This value is null if a job has been paused for less than 23 days.

      • jobPausedAt (datetime) --

        The date and time, in UTC and extended ISO 8601 format, when you paused the job.

GetBucketStatistics (updated) Link ¶
Changes (response)
{'bucketCountByEffectivePermission': {'unknown': 'long'},
 'bucketCountBySharedAccessType': {'unknown': 'long'}}

Retrieves (queries) aggregated statistical data for all the S3 buckets that Amazon Macie monitors and analyzes.

See also: AWS API Documentation

Request Syntax

client.get_bucket_statistics(
    accountId='string'
)
type accountId

string

param accountId

The unique identifier for the AWS account.

rtype

dict

returns

Response Syntax

{
    'bucketCount': 123,
    'bucketCountByEffectivePermission': {
        'publiclyAccessible': 123,
        'publiclyReadable': 123,
        'publiclyWritable': 123,
        'unknown': 123
    },
    'bucketCountByEncryptionType': {
        'kmsManaged': 123,
        's3Managed': 123,
        'unencrypted': 123
    },
    'bucketCountBySharedAccessType': {
        'external': 123,
        'internal': 123,
        'notShared': 123,
        'unknown': 123
    },
    'classifiableObjectCount': 123,
    'classifiableSizeInBytes': 123,
    'lastUpdated': datetime(2015, 1, 1),
    'objectCount': 123,
    'sizeInBytes': 123,
    'sizeInBytesCompressed': 123,
    'unclassifiableObjectCount': {
        'fileType': 123,
        'storageClass': 123,
        'total': 123
    },
    'unclassifiableObjectSizeInBytes': {
        'fileType': 123,
        'storageClass': 123,
        'total': 123
    }
}

Response Structure

  • (dict) --

    The request succeeded.

    • bucketCount (integer) --

      The total number of buckets.

    • bucketCountByEffectivePermission (dict) --

      The total number of buckets that are publicly accessible based on a combination of permissions settings for each bucket.

      • publiclyAccessible (integer) --

        The total number of buckets that allow the general public to have read or write access to the bucket.

      • publiclyReadable (integer) --

        The total number of buckets that allow the general public to have read access to the bucket.

      • publiclyWritable (integer) --

        The total number of buckets that allow the general public to have write access to the bucket.

      • unknown (integer) --

        The total number of buckets that Amazon Macie wasn't able to evaluate permissions settings for. Macie can't determine whether these buckets are publicly accessible.

    • bucketCountByEncryptionType (dict) --

      The total number of buckets, grouped by server-side encryption type. This object also reports the total number of buckets that don't encrypt objects by default.

      • kmsManaged (integer) --

        The total number of buckets that use an AWS Key Management Service (AWS KMS) customer master key (CMK) to encrypt objects. These buckets use AWS KMS AWS-managed (AWS-KMS) encryption or AWS KMS customer-managed (SSE-KMS) encryption.

      • s3Managed (integer) --

        The total number of buckets that use an Amazon S3-managed key to encrypt objects. These buckets use Amazon S3-managed (SSE-S3) encryption.

      • unencrypted (integer) --

        The total number of buckets that don't encrypt objects by default. Default encryption is disabled for these buckets.

    • bucketCountBySharedAccessType (dict) --

      The total number of buckets that are shared with another AWS account.

      • external (integer) --

        The total number of buckets that are shared with an AWS account that isn't part of the same Amazon Macie organization.

      • internal (integer) --

        The total number of buckets that are shared with an AWS account that's part of the same Amazon Macie organization.

      • notShared (integer) --

        The total number of buckets that aren't shared with other AWS accounts.

      • unknown (integer) --

        The total number of buckets that Amazon Macie wasn't able to evaluate shared access settings for. Macie can't determine whether these buckets are shared with other AWS accounts.

    • classifiableObjectCount (integer) --

      The total number of objects that Amazon Macie can analyze in the buckets. These objects use a supported storage class and have a file name extension for a supported file or storage format.

    • classifiableSizeInBytes (integer) --

      The total storage size, in bytes, of all the objects that Amazon Macie can analyze in the buckets. These objects use a supported storage class and have a file name extension for a supported file or storage format.

    • lastUpdated (datetime) --

      The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently retrieved data about the buckets from Amazon S3.

    • objectCount (integer) --

      The total number of objects in the buckets.

    • sizeInBytes (integer) --

      The total storage size, in bytes, of the buckets.

    • sizeInBytesCompressed (integer) --

      The total compressed storage size, in bytes, of the buckets.

    • unclassifiableObjectCount (dict) --

      The total number of objects that Amazon Macie can't analyze in the buckets. These objects don't use a supported storage class or don't have a file name extension for a supported file or storage format.

      • fileType (integer) --

        The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects don't have a file name extension for a supported file or storage format.

      • storageClass (integer) --

        The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class.

      • total (integer) --

        The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class or don't have a file name extension for a supported file or storage format.

    • unclassifiableObjectSizeInBytes (dict) --

      The total storage size, in bytes, of all the objects that Amazon Macie can't analyze in the buckets. These objects don't use a supported storage class or don't have a file name extension for a supported file or storage format.

      • fileType (integer) --

        The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects don't have a file name extension for a supported file or storage format.

      • storageClass (integer) --

        The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class.

      • total (integer) --

        The total storage size (in bytes) or number of objects that Amazon Macie can't analyze because the objects use an unsupported storage class or don't have a file name extension for a supported file or storage format.

GetFindings (updated) Link ¶
Changes (response)
{'findings': {'classificationDetails': {'result': {'additionalOccurrences': 'boolean',
                                                   'customDataIdentifiers': {'detections': {'occurrences': {'cells': [{'cellReference': 'string',
                                                                                                                       'column': 'long',
                                                                                                                       'columnName': 'string',
                                                                                                                       'row': 'long'}],
                                                                                                            'lineRanges': [{'end': 'long',
                                                                                                                            'start': 'long',
                                                                                                                            'startColumn': 'long'}],
                                                                                                            'offsetRanges': [{'end': 'long',
                                                                                                                              'start': 'long',
                                                                                                                              'startColumn': 'long'}],
                                                                                                            'pages': [{'lineRange': {'end': 'long',
                                                                                                                                     'start': 'long',
                                                                                                                                     'startColumn': 'long'},
                                                                                                                       'offsetRange': {'end': 'long',
                                                                                                                                       'start': 'long',
                                                                                                                                       'startColumn': 'long'},
                                                                                                                       'pageNumber': 'long'}],
                                                                                                            'records': [{'recordIndex': 'long'}]}}},
                                                   'sensitiveData': {'detections': {'occurrences': {'cells': [{'cellReference': 'string',
                                                                                                               'column': 'long',
                                                                                                               'columnName': 'string',
                                                                                                               'row': 'long'}],
                                                                                                    'lineRanges': [{'end': 'long',
                                                                                                                    'start': 'long',
                                                                                                                    'startColumn': 'long'}],
                                                                                                    'offsetRanges': [{'end': 'long',
                                                                                                                      'start': 'long',
                                                                                                                      'startColumn': 'long'}],
                                                                                                    'pages': [{'lineRange': {'end': 'long',
                                                                                                                             'start': 'long',
                                                                                                                             'startColumn': 'long'},
                                                                                                               'offsetRange': {'end': 'long',
                                                                                                                               'start': 'long',
                                                                                                                               'startColumn': 'long'},
                                                                                                               'pageNumber': 'long'}],
                                                                                                    'records': [{'recordIndex': 'long'}]}}}}}}}

Retrieves the details of one or more findings.

See also: AWS API Documentation

Request Syntax

client.get_findings(
    findingIds=[
        'string',
    ],
    sortCriteria={
        'attributeName': 'string',
        'orderBy': 'ASC'|'DESC'
    }
)
type findingIds

list

param findingIds

[REQUIRED]

An array of strings that lists the unique identifiers for the findings to retrieve.

  • (string) --

type sortCriteria

dict

param sortCriteria

The criteria for sorting the results of the request.

  • attributeName (string) --

    The name of the property to sort the results by. This value can be the name of any property that Amazon Macie defines for a finding.

  • orderBy (string) --

    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.

rtype

dict

returns

Response Syntax

{
    'findings': [
        {
            'accountId': 'string',
            'archived': True|False,
            'category': 'CLASSIFICATION'|'POLICY',
            'classificationDetails': {
                'detailedResultsLocation': 'string',
                'jobArn': 'string',
                'jobId': 'string',
                'result': {
                    'additionalOccurrences': True|False,
                    'customDataIdentifiers': {
                        'detections': [
                            {
                                'arn': 'string',
                                'count': 123,
                                'name': 'string',
                                'occurrences': {
                                    'cells': [
                                        {
                                            'cellReference': 'string',
                                            'column': 123,
                                            'columnName': 'string',
                                            'row': 123
                                        },
                                    ],
                                    'lineRanges': [
                                        {
                                            'end': 123,
                                            'start': 123,
                                            'startColumn': 123
                                        },
                                    ],
                                    'offsetRanges': [
                                        {
                                            'end': 123,
                                            'start': 123,
                                            'startColumn': 123
                                        },
                                    ],
                                    'pages': [
                                        {
                                            'lineRange': {
                                                'end': 123,
                                                'start': 123,
                                                'startColumn': 123
                                            },
                                            'offsetRange': {
                                                'end': 123,
                                                'start': 123,
                                                'startColumn': 123
                                            },
                                            'pageNumber': 123
                                        },
                                    ],
                                    'records': [
                                        {
                                            'recordIndex': 123
                                        },
                                    ]
                                }
                            },
                        ],
                        'totalCount': 123
                    },
                    'mimeType': 'string',
                    'sensitiveData': [
                        {
                            'category': 'FINANCIAL_INFORMATION'|'PERSONAL_INFORMATION'|'CREDENTIALS'|'CUSTOM_IDENTIFIER',
                            'detections': [
                                {
                                    'count': 123,
                                    'occurrences': {
                                        'cells': [
                                            {
                                                'cellReference': 'string',
                                                'column': 123,
                                                'columnName': 'string',
                                                'row': 123
                                            },
                                        ],
                                        'lineRanges': [
                                            {
                                                'end': 123,
                                                'start': 123,
                                                'startColumn': 123
                                            },
                                        ],
                                        'offsetRanges': [
                                            {
                                                'end': 123,
                                                'start': 123,
                                                'startColumn': 123
                                            },
                                        ],
                                        'pages': [
                                            {
                                                'lineRange': {
                                                    'end': 123,
                                                    'start': 123,
                                                    'startColumn': 123
                                                },
                                                'offsetRange': {
                                                    'end': 123,
                                                    'start': 123,
                                                    'startColumn': 123
                                                },
                                                'pageNumber': 123
                                            },
                                        ],
                                        'records': [
                                            {
                                                'recordIndex': 123
                                            },
                                        ]
                                    },
                                    'type': 'string'
                                },
                            ],
                            'totalCount': 123
                        },
                    ],
                    'sizeClassified': 123,
                    'status': {
                        'code': 'string',
                        'reason': 'string'
                    }
                }
            },
            'count': 123,
            'createdAt': datetime(2015, 1, 1),
            'description': 'string',
            'id': 'string',
            'partition': 'string',
            'policyDetails': {
                'action': {
                    'actionType': 'AWS_API_CALL',
                    'apiCallDetails': {
                        'api': 'string',
                        'apiServiceName': 'string',
                        'firstSeen': datetime(2015, 1, 1),
                        'lastSeen': datetime(2015, 1, 1)
                    }
                },
                'actor': {
                    'domainDetails': {
                        'domainName': 'string'
                    },
                    'ipAddressDetails': {
                        'ipAddressV4': 'string',
                        'ipCity': {
                            'name': 'string'
                        },
                        'ipCountry': {
                            'code': 'string',
                            'name': 'string'
                        },
                        'ipGeoLocation': {
                            'lat': 123.0,
                            'lon': 123.0
                        },
                        'ipOwner': {
                            'asn': 'string',
                            'asnOrg': 'string',
                            'isp': 'string',
                            'org': 'string'
                        }
                    },
                    'userIdentity': {
                        'assumedRole': {
                            'accessKeyId': 'string',
                            'accountId': 'string',
                            'arn': 'string',
                            'principalId': 'string',
                            'sessionContext': {
                                'attributes': {
                                    'creationDate': datetime(2015, 1, 1),
                                    'mfaAuthenticated': True|False
                                },
                                'sessionIssuer': {
                                    'accountId': 'string',
                                    'arn': 'string',
                                    'principalId': 'string',
                                    'type': 'string',
                                    'userName': 'string'
                                }
                            }
                        },
                        'awsAccount': {
                            'accountId': 'string',
                            'principalId': 'string'
                        },
                        'awsService': {
                            'invokedBy': 'string'
                        },
                        'federatedUser': {
                            'accessKeyId': 'string',
                            'accountId': 'string',
                            'arn': 'string',
                            'principalId': 'string',
                            'sessionContext': {
                                'attributes': {
                                    'creationDate': datetime(2015, 1, 1),
                                    'mfaAuthenticated': True|False
                                },
                                'sessionIssuer': {
                                    'accountId': 'string',
                                    'arn': 'string',
                                    'principalId': 'string',
                                    'type': 'string',
                                    'userName': 'string'
                                }
                            }
                        },
                        'iamUser': {
                            'accountId': 'string',
                            'arn': 'string',
                            'principalId': 'string',
                            'userName': 'string'
                        },
                        'root': {
                            'accountId': 'string',
                            'arn': 'string',
                            'principalId': 'string'
                        },
                        'type': 'AssumedRole'|'IAMUser'|'FederatedUser'|'Root'|'AWSAccount'|'AWSService'
                    }
                }
            },
            'region': 'string',
            'resourcesAffected': {
                's3Bucket': {
                    'arn': 'string',
                    'createdAt': datetime(2015, 1, 1),
                    'defaultServerSideEncryption': {
                        'encryptionType': 'NONE'|'AES256'|'aws:kms'|'UNKNOWN',
                        'kmsMasterKeyId': 'string'
                    },
                    'name': 'string',
                    'owner': {
                        'displayName': 'string',
                        'id': 'string'
                    },
                    'publicAccess': {
                        'effectivePermission': 'PUBLIC'|'NOT_PUBLIC'|'UNKNOWN',
                        'permissionConfiguration': {
                            'accountLevelPermissions': {
                                'blockPublicAccess': {
                                    'blockPublicAcls': True|False,
                                    'blockPublicPolicy': True|False,
                                    'ignorePublicAcls': True|False,
                                    'restrictPublicBuckets': True|False
                                }
                            },
                            'bucketLevelPermissions': {
                                'accessControlList': {
                                    'allowsPublicReadAccess': True|False,
                                    'allowsPublicWriteAccess': True|False
                                },
                                'blockPublicAccess': {
                                    'blockPublicAcls': True|False,
                                    'blockPublicPolicy': True|False,
                                    'ignorePublicAcls': True|False,
                                    'restrictPublicBuckets': True|False
                                },
                                'bucketPolicy': {
                                    'allowsPublicReadAccess': True|False,
                                    'allowsPublicWriteAccess': True|False
                                }
                            }
                        }
                    },
                    'tags': [
                        {
                            'key': 'string',
                            'value': 'string'
                        },
                    ]
                },
                's3Object': {
                    'bucketArn': 'string',
                    'eTag': 'string',
                    'extension': 'string',
                    'key': 'string',
                    'lastModified': datetime(2015, 1, 1),
                    'path': 'string',
                    'publicAccess': True|False,
                    'serverSideEncryption': {
                        'encryptionType': 'NONE'|'AES256'|'aws:kms'|'UNKNOWN',
                        'kmsMasterKeyId': 'string'
                    },
                    'size': 123,
                    'storageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'INTELLIGENT_TIERING'|'DEEP_ARCHIVE'|'ONEZONE_IA'|'GLACIER',
                    'tags': [
                        {
                            'key': 'string',
                            'value': 'string'
                        },
                    ],
                    'versionId': 'string'
                }
            },
            'sample': True|False,
            'schemaVersion': 'string',
            'severity': {
                'description': 'Low'|'Medium'|'High',
                'score': 123
            },
            'title': 'string',
            'type': 'SensitiveData:S3Object/Multiple'|'SensitiveData:S3Object/Financial'|'SensitiveData:S3Object/Personal'|'SensitiveData:S3Object/Credentials'|'SensitiveData:S3Object/CustomIdentifier'|'Policy:IAMUser/S3BucketPublic'|'Policy:IAMUser/S3BucketSharedExternally'|'Policy:IAMUser/S3BucketReplicatedExternally'|'Policy:IAMUser/S3BucketEncryptionDisabled'|'Policy:IAMUser/S3BlockPublicAccessDisabled',
            'updatedAt': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    The request succeeded.

    • findings (list) --

      An array of objects, one for each finding that meets the criteria specified in the request.

      • (dict) --

        Provides the details of a finding.

        • accountId (string) --

          The unique identifier for the AWS account that the finding applies to. This is typically the account that owns the affected resource.

        • archived (boolean) --

          Specifies whether the finding is archived.

        • category (string) --

          The category of the finding. Possible values are: CLASSIFICATION, for a sensitive data finding; and, POLICY, for a policy finding.

        • classificationDetails (dict) --

          The details of a sensitive data finding. This value is null for a policy finding.

          • detailedResultsLocation (string) --

            The path to the folder or file (in Amazon S3) that contains the corresponding sensitive data discovery result for the finding. If a finding applies to a large archive or compressed file, this value is the path to a folder. Otherwise, this value is the path to a file.

          • jobArn (string) --

            The Amazon Resource Name (ARN) of the classification job that produced the finding.

          • jobId (string) --

            The unique identifier for the classification job that produced the finding.

          • result (dict) --

            The status and other details for the finding.

            • additionalOccurrences (boolean) --

              Specifies whether Amazon Macie detected additional occurrences of sensitive data in the S3 object. A finding includes location data for a maximum of 15 occurrences of sensitive data.

              This value can help you to determine whether to investigate additional occurrences of sensitive data in an object. You can do this by referring to the corresponding sensitive data discovery result for the finding (ClassificationDetails.detailedResultsLocation).

            • customDataIdentifiers (dict) --

              The custom data identifiers that detected the sensitive data and the number of occurrences of the data that they detected.

              • detections (list) --

                The custom data identifiers that detected the data, and the number of occurrences of the data that each identifier detected.

                • (dict) --

                  Provides information about a custom data identifier that produced a sensitive data finding, and the sensitive data that it detected for the finding.

                  • arn (string) --

                    The Amazon Resource Name (ARN) of the custom data identifier.

                  • count (integer) --

                    The total number of occurrences of the sensitive data that the custom data identifier detected.

                  • name (string) --

                    The name of the custom data identifier.

                  • occurrences (dict) --

                    The location of 1-15 occurrences of the sensitive data that the custom data identifier detected. A finding includes location data for a maximum of 15 occurrences of sensitive data.

                    • cells (list) --

                      An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file. Each object specifies the cell that contains the data. This value is null for all other types of files.

                      • (dict) --

                        Specifies the location of an occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file.

                        • cellReference (string) --

                          The location of the cell, as an absolute cell reference, that contains the data. For example, Sheet2!C5 for cell C5 on Sheet2 in a Microsoft Excel workbook. This value is null for CSV and TSV files.

                        • column (integer) --

                          The column number of the column that contains the data. For a Microsoft Excel workbook, this value correlates to the alphabetical character(s) for a column identifier. For example, 1 for column A, 2 for column B, and so on.

                        • columnName (string) --

                          The name of the column that contains the data, if available.

                        • row (integer) --

                          The row number of the row that contains the data.

                    • lineRanges (list) --

                      An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Microsoft Word document, or non-binary text file, such as an HTML, JSON, TXT, or XML file. Each object specifies the line that contains the data, and the position of the data on that line.

                      This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the locations of: full names and addresses in a Microsoft Excel workbook, CSV file, or TSV file; data in unstructured sections of an otherwise structured file, such as a comment in a file; and, data in a malformed file that Amazon Macie analyzes as plain text.

                      • (dict) --

                        Provides details about the location of an occurrence of sensitive data in an Adobe Portable Document Format file, Apache Avro object container, Microsoft Word document, or non-binary text file.

                        • end (integer) --

                          Possible values are:

                          • In an Occurrences.lineRanges array, the number of lines from the end of the file.

                          • In an Occurrences.offsetRanges array, the number of characters from the end of the file.

                          • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the end of the page.

                        • start (integer) --

                          Possible values are:

                          • In an Occurrences.lineRanges array, the number of lines from the start of the file.

                          • In an Occurrences.offsetRanges array, the number of characters from the start of the file.

                          • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the start of the page.

                        • startColumn (integer) --

                          The column number for the column that contains the data, if the file contains structured data.

                    • offsetRanges (list) --

                      An array of objects, one for each occurrence of sensitive data in a binary text file. Each object specifies the position of the data relative to the start of the file.

                      This value is typically null. For binary text files, Macie adds location data to a lineRanges.Range or Page object, depending on the file type.

                      • (dict) --

                        Provides details about the location of an occurrence of sensitive data in an Adobe Portable Document Format file, Apache Avro object container, Microsoft Word document, or non-binary text file.

                        • end (integer) --

                          Possible values are:

                          • In an Occurrences.lineRanges array, the number of lines from the end of the file.

                          • In an Occurrences.offsetRanges array, the number of characters from the end of the file.

                          • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the end of the page.

                        • start (integer) --

                          Possible values are:

                          • In an Occurrences.lineRanges array, the number of lines from the start of the file.

                          • In an Occurrences.offsetRanges array, the number of characters from the start of the file.

                          • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the start of the page.

                        • startColumn (integer) --

                          The column number for the column that contains the data, if the file contains structured data.

                    • pages (list) --

                      An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. Each object specifies the page that contains the data, and the position of the data on that page. This value is null for all other types of files.

                      • (dict) --

                        Specifies the location of an occurrence of sensitive data in an Adobe Portable Document Format file.

                        • lineRange (dict) --

                          The line that contains the data, and the position of the data on that line.

                          • end (integer) --

                            Possible values are:

                            • In an Occurrences.lineRanges array, the number of lines from the end of the file.

                            • In an Occurrences.offsetRanges array, the number of characters from the end of the file.

                            • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the end of the page.

                          • start (integer) --

                            Possible values are:

                            • In an Occurrences.lineRanges array, the number of lines from the start of the file.

                            • In an Occurrences.offsetRanges array, the number of characters from the start of the file.

                            • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the start of the page.

                          • startColumn (integer) --

                            The column number for the column that contains the data, if the file contains structured data.

                        • offsetRange (dict) --

                          The position of the data on the page, relative to the start and end of the page.

                          • end (integer) --

                            Possible values are:

                            • In an Occurrences.lineRanges array, the number of lines from the end of the file.

                            • In an Occurrences.offsetRanges array, the number of characters from the end of the file.

                            • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the end of the page.

                          • start (integer) --

                            Possible values are:

                            • In an Occurrences.lineRanges array, the number of lines from the start of the file.

                            • In an Occurrences.offsetRanges array, the number of characters from the start of the file.

                            • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the start of the page.

                          • startColumn (integer) --

                            The column number for the column that contains the data, if the file contains structured data.

                        • pageNumber (integer) --

                          The page number of the page that contains the data.

                    • records (list) --

                      An array of objects, one for each occurrence of sensitive data in an Apache Parquet file. Each object specifies the row that contains the data. This value is null for all other types of files.

                      • (dict) --

                        Specifies the location of an occurrence of sensitive data in an Apache Parquet file.

                        • recordIndex (integer) --

                          The row index, starting from 0, for the row that contains the data.

              • totalCount (integer) --

                The total number of occurrences of the data that was detected by the custom data identifiers and produced the finding.

            • mimeType (string) --

              The type of content, as a MIME type, that the finding applies to. For example, application/gzip, for a GNU Gzip compressed archive file, or application/pdf, for an Adobe Portable Document Format file.

            • sensitiveData (list) --

              The category, types, and number of occurrences of the sensitive data that produced the finding.

              • (dict) --

                Provides information about the category, types, and occurrences of sensitive data that produced a sensitive data finding.

                • category (string) --

                  The category of sensitive data that was detected. For example: FINANCIAL_INFORMATION, for financial information such as credit card numbers; PERSONAL_INFORMATION, for personally identifiable information, such as full names and mailing addresses, or personal health information; or, CUSTOM_IDENTIFIER, for data that was detected by a custom data identifier.

                • detections (list) --

                  An array of objects, one for each type of sensitive data that was detected. Each object reports the number of occurrences of a specific type of sensitive data that was detected, and the location of up to 15 of those occurrences.

                  • (dict) --

                    Provides information about a type of sensitive data that was detected by managed data identifiers and produced a sensitive data finding.

                    • count (integer) --

                      The total number of occurrences of the type of sensitive data that was detected.

                    • occurrences (dict) --

                      The location of 1-15 occurrences of the sensitive data that was detected. A finding includes location data for a maximum of 15 occurrences of sensitive data.

                      • cells (list) --

                        An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file. Each object specifies the cell that contains the data. This value is null for all other types of files.

                        • (dict) --

                          Specifies the location of an occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file.

                          • cellReference (string) --

                            The location of the cell, as an absolute cell reference, that contains the data. For example, Sheet2!C5 for cell C5 on Sheet2 in a Microsoft Excel workbook. This value is null for CSV and TSV files.

                          • column (integer) --

                            The column number of the column that contains the data. For a Microsoft Excel workbook, this value correlates to the alphabetical character(s) for a column identifier. For example, 1 for column A, 2 for column B, and so on.

                          • columnName (string) --

                            The name of the column that contains the data, if available.

                          • row (integer) --

                            The row number of the row that contains the data.

                      • lineRanges (list) --

                        An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Microsoft Word document, or non-binary text file, such as an HTML, JSON, TXT, or XML file. Each object specifies the line that contains the data, and the position of the data on that line.

                        This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the locations of: full names and addresses in a Microsoft Excel workbook, CSV file, or TSV file; data in unstructured sections of an otherwise structured file, such as a comment in a file; and, data in a malformed file that Amazon Macie analyzes as plain text.

                        • (dict) --

                          Provides details about the location of an occurrence of sensitive data in an Adobe Portable Document Format file, Apache Avro object container, Microsoft Word document, or non-binary text file.

                          • end (integer) --

                            Possible values are:

                            • In an Occurrences.lineRanges array, the number of lines from the end of the file.

                            • In an Occurrences.offsetRanges array, the number of characters from the end of the file.

                            • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the end of the page.

                          • start (integer) --

                            Possible values are:

                            • In an Occurrences.lineRanges array, the number of lines from the start of the file.

                            • In an Occurrences.offsetRanges array, the number of characters from the start of the file.

                            • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the start of the page.

                          • startColumn (integer) --

                            The column number for the column that contains the data, if the file contains structured data.

                      • offsetRanges (list) --

                        An array of objects, one for each occurrence of sensitive data in a binary text file. Each object specifies the position of the data relative to the start of the file.

                        This value is typically null. For binary text files, Macie adds location data to a lineRanges.Range or Page object, depending on the file type.

                        • (dict) --

                          Provides details about the location of an occurrence of sensitive data in an Adobe Portable Document Format file, Apache Avro object container, Microsoft Word document, or non-binary text file.

                          • end (integer) --

                            Possible values are:

                            • In an Occurrences.lineRanges array, the number of lines from the end of the file.

                            • In an Occurrences.offsetRanges array, the number of characters from the end of the file.

                            • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the end of the page.

                          • start (integer) --

                            Possible values are:

                            • In an Occurrences.lineRanges array, the number of lines from the start of the file.

                            • In an Occurrences.offsetRanges array, the number of characters from the start of the file.

                            • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the start of the page.

                          • startColumn (integer) --

                            The column number for the column that contains the data, if the file contains structured data.

                      • pages (list) --

                        An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. Each object specifies the page that contains the data, and the position of the data on that page. This value is null for all other types of files.

                        • (dict) --

                          Specifies the location of an occurrence of sensitive data in an Adobe Portable Document Format file.

                          • lineRange (dict) --

                            The line that contains the data, and the position of the data on that line.

                            • end (integer) --

                              Possible values are:

                              • In an Occurrences.lineRanges array, the number of lines from the end of the file.

                              • In an Occurrences.offsetRanges array, the number of characters from the end of the file.

                              • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the end of the page.

                            • start (integer) --

                              Possible values are:

                              • In an Occurrences.lineRanges array, the number of lines from the start of the file.

                              • In an Occurrences.offsetRanges array, the number of characters from the start of the file.

                              • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the start of the page.

                            • startColumn (integer) --

                              The column number for the column that contains the data, if the file contains structured data.

                          • offsetRange (dict) --

                            The position of the data on the page, relative to the start and end of the page.

                            • end (integer) --

                              Possible values are:

                              • In an Occurrences.lineRanges array, the number of lines from the end of the file.

                              • In an Occurrences.offsetRanges array, the number of characters from the end of the file.

                              • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the end of the page.

                            • start (integer) --

                              Possible values are:

                              • In an Occurrences.lineRanges array, the number of lines from the start of the file.

                              • In an Occurrences.offsetRanges array, the number of characters from the start of the file.

                              • In a Page object, the number of lines (lineRange) or characters (offsetRange) from the start of the page.

                            • startColumn (integer) --

                              The column number for the column that contains the data, if the file contains structured data.

                          • pageNumber (integer) --

                            The page number of the page that contains the data.

                      • records (list) --

                        An array of objects, one for each occurrence of sensitive data in an Apache Parquet file. Each object specifies the row that contains the data. This value is null for all other types of files.

                        • (dict) --

                          Specifies the location of an occurrence of sensitive data in an Apache Parquet file.

                          • recordIndex (integer) --

                            The row index, starting from 0, for the row that contains the data.

                    • type (string) --

                      The type of sensitive data that was detected. For example, AWS_CREDENTIALS, PHONE_NUMBER, or ADDRESS.

                • totalCount (integer) --

                  The total number of occurrences of the sensitive data that was detected.

            • sizeClassified (integer) --

              The total size, in bytes, of the data that the finding applies to.

            • status (dict) --

              The status of the finding.

              • code (string) --

                The status of the finding. Possible values are:

                • COMPLETE - Amazon Macie successfully completed its analysis of the object that the finding applies to.

                • PARTIAL - Macie was able to analyze only a subset of the data in the object that the finding applies to. For example, the object is a compressed or archive file that contains files in an unsupported format.

                • SKIPPED - Macie wasn't able to analyze the object that the finding applies to. For example, the object is a malformed file or a file that uses an unsupported format.

              • reason (string) --

                A brief description of the status of the finding. Amazon Macie uses this value to notify you of any errors, warnings, or considerations that might impact your analysis of the finding.

        • count (integer) --

          The total number of occurrences of the finding.

        • createdAt (datetime) --

          The date and time, in UTC and extended ISO 8601 format, when the finding was created.

        • description (string) --

          The description of the finding.

        • id (string) --

          The unique identifier for the finding. This is a random string that Amazon Macie generates and assigns to a finding when it creates the finding.

        • partition (string) --

          The AWS partition that Amazon Macie created the finding in.

        • policyDetails (dict) --

          The details of a policy finding. This value is null for a sensitive data finding.

          • action (dict) --

            The action that produced the finding.

            • actionType (string) --

              The type of action that occurred for the affected resource. This value is typically AWS_API_CALL, which indicates that an entity invoked an API operation for the resource.

            • apiCallDetails (dict) --

              The invocation details of the API operation that an entity invoked for the affected resource, if the value for the actionType property is AWS_API_CALL.

              • api (string) --

                The name of the operation that was invoked most recently and produced the finding.

              • apiServiceName (string) --

                The URL of the AWS service that provides the operation, for example: s3.amazonaws.com.

              • firstSeen (datetime) --

                The first date and time, in UTC and extended ISO 8601 format, when any operation was invoked and produced the finding.

              • lastSeen (datetime) --

                The most recent date and time, in UTC and extended ISO 8601 format, when the specified operation (api) was invoked and produced the finding.

          • actor (dict) --

            The entity that performed the action that produced the finding.

            • domainDetails (dict) --

              The domain name of the device that the entity used to perform the action on the affected resource.

              • domainName (string) --

                The name of the domain.

            • ipAddressDetails (dict) --

              The IP address of the device that the entity used to perform the action on the affected resource. This object also provides information such as the owner and geographic location for the IP address.

              • ipAddressV4 (string) --

                The Internet Protocol version 4 (IPv4) address of the device.

              • ipCity (dict) --

                The city that the IP address originated from.

                • name (string) --

                  The name of the city.

              • ipCountry (dict) --

                The country that the IP address originated from.

                • code (string) --

                  The two-character code, in ISO 3166-1 alpha-2 format, for the country that the IP address originated from. For example, US for the United States.

                • name (string) --

                  The name of the country that the IP address originated from.

              • ipGeoLocation (dict) --

                The geographic coordinates of the location that the IP address originated from.

                • lat (float) --

                  The latitude coordinate of the location, rounded to four decimal places.

                • lon (float) --

                  The longitude coordinate of the location, rounded to four decimal places.

              • ipOwner (dict) --

                The registered owner of the IP address.

                • asn (string) --

                  The autonomous system number (ASN) for the autonomous system that included the IP address.

                • asnOrg (string) --

                  The organization identifier that's associated with the autonomous system number (ASN) for the autonomous system that included the IP address.

                • isp (string) --

                  The name of the internet service provider (ISP) that owned the IP address.

                • org (string) --

                  The name of the organization that owned the IP address.

            • userIdentity (dict) --

              The type and other characteristics of the entity that performed the action on the affected resource.

              • assumedRole (dict) --

                If the action was performed with temporary security credentials that were obtained using the AssumeRole operation of the AWS Security Token Service (AWS STS) API, the identifiers, session context, and other details about the identity.

                • accessKeyId (string) --

                  The AWS access key ID that identifies the credentials.

                • accountId (string) --

                  The unique identifier for the AWS account that owns the entity that was used to get the credentials.

                • arn (string) --

                  The Amazon Resource Name (ARN) of the entity that was used to get the credentials.

                • principalId (string) --

                  The unique identifier for the entity that was used to get the credentials.

                • sessionContext (dict) --

                  The details of the session that was created for the credentials, including the entity that issued the session.

                  • attributes (dict) --

                    The date and time when the credentials were issued, and whether the credentials were authenticated with a multi-factor authentication (MFA) device.

                    • creationDate (datetime) --

                      The date and time, in UTC and ISO 8601 format, when the credentials were issued.

                    • mfaAuthenticated (boolean) --

                      Specifies whether the credentials were authenticated with a multi-factor authentication (MFA) device.

                  • sessionIssuer (dict) --

                    The source and type of credentials that were issued to the entity.

                    • accountId (string) --

                      The unique identifier for the AWS account that owns the entity that was used to get the credentials.

                    • arn (string) --

                      The Amazon Resource Name (ARN) of the source account, IAM user, or role that was used to get the credentials.

                    • principalId (string) --

                      The unique identifier for the entity that was used to get the credentials.

                    • type (string) --

                      The source of the temporary security credentials, such as Root, IAMUser, or Role.

                    • userName (string) --

                      The name or alias of the user or role that issued the session. This value is null if the credentials were obtained from a root account that doesn't have an alias.

              • awsAccount (dict) --

                If the action was performed using the credentials for another AWS account, the details of that account.

                • accountId (string) --

                  The unique identifier for the AWS account.

                • principalId (string) --

                  The unique identifier for the entity that performed the action.

              • awsService (dict) --

                If the action was performed by an AWS account that belongs to an AWS service, the name of the service.

                • invokedBy (string) --

                  The name of the AWS service that performed the action.

              • federatedUser (dict) --

                If the action was performed with temporary security credentials that were obtained using the GetFederationToken operation of the AWS Security Token Service (AWS STS) API, the identifiers, session context, and other details about the identity.

                • accessKeyId (string) --

                  The AWS access key ID that identifies the credentials.

                • accountId (string) --

                  The unique identifier for the AWS account that owns the entity that was used to get the credentials.

                • arn (string) --

                  The Amazon Resource Name (ARN) of the entity that was used to get the credentials.

                • principalId (string) --

                  The unique identifier for the entity that was used to get the credentials.

                • sessionContext (dict) --

                  The details of the session that was created for the credentials, including the entity that issued the session.

                  • attributes (dict) --

                    The date and time when the credentials were issued, and whether the credentials were authenticated with a multi-factor authentication (MFA) device.

                    • creationDate (datetime) --

                      The date and time, in UTC and ISO 8601 format, when the credentials were issued.

                    • mfaAuthenticated (boolean) --

                      Specifies whether the credentials were authenticated with a multi-factor authentication (MFA) device.

                  • sessionIssuer (dict) --

                    The source and type of credentials that were issued to the entity.

                    • accountId (string) --

                      The unique identifier for the AWS account that owns the entity that was used to get the credentials.

                    • arn (string) --

                      The Amazon Resource Name (ARN) of the source account, IAM user, or role that was used to get the credentials.

                    • principalId (string) --

                      The unique identifier for the entity that was used to get the credentials.

                    • type (string) --

                      The source of the temporary security credentials, such as Root, IAMUser, or Role.

                    • userName (string) --

                      The name or alias of the user or role that issued the session. This value is null if the credentials were obtained from a root account that doesn't have an alias.

              • iamUser (dict) --

                If the action was performed using the credentials for an AWS Identity and Access Management (IAM) user, the name and other details about the user.

                • accountId (string) --

                  The unique identifier for the AWS account that's associated with the IAM user who performed the action.

                • arn (string) --

                  The Amazon Resource Name (ARN) of the principal that performed the action. The last section of the ARN contains the name of the user who performed the action.

                • principalId (string) --

                  The unique identifier for the IAM user who performed the action.

                • userName (string) --

                  The user name of the IAM user who performed the action.

              • root (dict) --

                If the action was performed using the credentials for your AWS account, the details of your account.

                • accountId (string) --

                  The unique identifier for the AWS account.

                • arn (string) --

                  The Amazon Resource Name (ARN) of the principal that performed the action. The last section of the ARN contains the name of the user or role that performed the action.

                • principalId (string) --

                  The unique identifier for the entity that performed the action.

              • type (string) --

                The type of entity that performed the action.

        • region (string) --

          The AWS Region that Amazon Macie created the finding in.

        • resourcesAffected (dict) --

          The resources that the finding applies to.

          • s3Bucket (dict) --

            An array of objects, one for each S3 bucket that the finding applies to. Each object provides a set of metadata about an affected S3 bucket.

            • arn (string) --

              The Amazon Resource Name (ARN) of the bucket.

            • createdAt (datetime) --

              The date and time, in UTC and extended ISO 8601 format, when the bucket was created.

            • defaultServerSideEncryption (dict) --

              The type of server-side encryption that's used by default to encrypt objects in the bucket.

              • encryptionType (string) --

                The server-side encryption algorithm that's used when storing data in the bucket or object. If encryption is disabled for the bucket or object, this value is NONE.

              • kmsMasterKeyId (string) --

                The unique identifier for the AWS Key Management Service (AWS KMS) master key that's used to encrypt the bucket or object. This value is null if AWS KMS isn't used to encrypt the bucket or object.

            • name (string) --

              The name of the bucket.

            • owner (dict) --

              The display name and account identifier for the user who owns the bucket.

              • displayName (string) --

                The display name of the user who owns the bucket.

              • id (string) --

                The AWS account ID for the user who owns the bucket.

            • publicAccess (dict) --

              The permissions settings that determine whether the bucket is publicly accessible.

              • effectivePermission (string) --

                Specifies whether the bucket is publicly accessible due to the combination of permissions settings that apply to the bucket. Possible values are:

                • NOT_PUBLIC - The bucket isn't publicly accessible.

                • PUBLIC - The bucket is publicly accessible.

                • UNKNOWN - Amazon Macie can't determine whether the bucket is publicly accessible.

              • permissionConfiguration (dict) --

                The account-level and bucket-level permissions for the bucket.

                • accountLevelPermissions (dict) --

                  The account-level permissions settings that apply to the bucket.

                  • blockPublicAccess (dict) --

                    The block public access settings for the bucket.

                    • blockPublicAcls (boolean) --

                      Specifies whether Amazon S3 blocks public access control lists (ACLs) for the bucket and objects in the bucket.

                    • blockPublicPolicy (boolean) --

                      Specifies whether Amazon S3 blocks public bucket policies for the bucket.

                    • ignorePublicAcls (boolean) --

                      Specifies whether Amazon S3 ignores public ACLs for the bucket and objects in the bucket.

                    • restrictPublicBuckets (boolean) --

                      Specifies whether Amazon S3 restricts public bucket policies for the bucket.

                • bucketLevelPermissions (dict) --

                  The bucket-level permissions settings for the bucket.

                  • accessControlList (dict) --

                    The permissions settings of the access control list (ACL) for the bucket. This value is null if an ACL hasn't been defined for the bucket.

                    • allowsPublicReadAccess (boolean) --

                      Specifies whether the ACL grants the general public with read access permissions for the bucket.

                    • allowsPublicWriteAccess (boolean) --

                      Specifies whether the ACL grants the general public with write access permissions for the bucket.

                  • blockPublicAccess (dict) --

                    The block public access settings for the bucket.

                    • blockPublicAcls (boolean) --

                      Specifies whether Amazon S3 blocks public access control lists (ACLs) for the bucket and objects in the bucket.

                    • blockPublicPolicy (boolean) --

                      Specifies whether Amazon S3 blocks public bucket policies for the bucket.

                    • ignorePublicAcls (boolean) --

                      Specifies whether Amazon S3 ignores public ACLs for the bucket and objects in the bucket.

                    • restrictPublicBuckets (boolean) --

                      Specifies whether Amazon S3 restricts public bucket policies for the bucket.

                  • bucketPolicy (dict) --

                    The permissions settings of the bucket policy for the bucket. This value is null if a bucket policy hasn't been defined for the bucket.

                    • allowsPublicReadAccess (boolean) --

                      Specifies whether the bucket policy allows the general public to have read access to the bucket.

                    • allowsPublicWriteAccess (boolean) --

                      Specifies whether the bucket policy allows the general public to have write access to the bucket.

            • tags (list) --

              The tags that are associated with the bucket.

              • (dict) --

                Provides information about the tags that are associated with an S3 bucket or object. Each tag consists of a required tag key and an associated tag value.

                • key (string) --

                  One part of a key-value pair that comprises a tag. A tag key is a general label that acts as a category for more specific tag values.

                • value (string) --

                  One part of a key-value pair that comprises a tag. A tag value acts as a descriptor for a tag key. A tag value can be empty or null.

          • s3Object (dict) --

            An array of objects, one for each S3 object that the finding applies to. Each object provides a set of metadata about an affected S3 object.

            • bucketArn (string) --

              The Amazon Resource Name (ARN) of the bucket that contains the object.

            • eTag (string) --

              The entity tag (ETag) that identifies the affected version of the object. If the object was overwritten or changed after Amazon Macie produced the finding, this value might be different from the current ETag for the object.

            • extension (string) --

              The file name extension of the object. If the object doesn't have a file name extension, this value is "".

            • key (string) --

              The full key (name) that's assigned to the object.

            • lastModified (datetime) --

              The date and time, in UTC and extended ISO 8601 format, when the object was last modified.

            • path (string) --

              The path to the object, including the full key (name).

            • publicAccess (boolean) --

              Specifies whether the object is publicly accessible due to the combination of permissions settings that apply to the object.

            • serverSideEncryption (dict) --

              The type of server-side encryption that's used for the object.

              • encryptionType (string) --

                The server-side encryption algorithm that's used when storing data in the bucket or object. If encryption is disabled for the bucket or object, this value is NONE.

              • kmsMasterKeyId (string) --

                The unique identifier for the AWS Key Management Service (AWS KMS) master key that's used to encrypt the bucket or object. This value is null if AWS KMS isn't used to encrypt the bucket or object.

            • size (integer) --

              The total storage size, in bytes, of the object.

            • storageClass (string) --

              The storage class of the object.

            • tags (list) --

              The tags that are associated with the object.

              • (dict) --

                Provides information about the tags that are associated with an S3 bucket or object. Each tag consists of a required tag key and an associated tag value.

                • key (string) --

                  One part of a key-value pair that comprises a tag. A tag key is a general label that acts as a category for more specific tag values.

                • value (string) --

                  One part of a key-value pair that comprises a tag. A tag value acts as a descriptor for a tag key. A tag value can be empty or null.

            • versionId (string) --

              The identifier for the affected version of the object.

        • sample (boolean) --

          Specifies whether the finding is a sample finding. A sample finding is a finding that uses example data to demonstrate what a finding might contain.

        • schemaVersion (string) --

          The version of the schema that was used to define the data structures in the finding.

        • severity (dict) --

          The severity level and score for the finding.

          • description (string) --

            The qualitative representation of the finding's severity, ranging from Low (least severe) to High (most severe).

          • score (integer) --

            The numerical representation of the finding's severity, ranging from 1 (least severe) to 3 (most severe).

        • title (string) --

          The brief description of the finding.

        • type (string) --

          The type of the finding.

        • updatedAt (datetime) --

          The date and time, in UTC and extended ISO 8601 format, when the finding was last updated. For sensitive data findings, this value is the same as the value for the createdAt property. All sensitive data findings are considered new (unique) because they derive from individual classification jobs.

ListClassificationJobs (updated) Link ¶
Changes (response)
{'items': {'jobStatus': {'USER_PAUSED'},
           'userPausedDetails': {'jobExpiresAt': 'timestamp',
                                 'jobImminentExpirationHealthEventArn': 'string',
                                 'jobPausedAt': 'timestamp'}}}

Retrieves a subset of information about one or more classification jobs.

See also: AWS API Documentation

Request Syntax

client.list_classification_jobs(
    filterCriteria={
        'excludes': [
            {
                'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS',
                'key': 'jobType'|'jobStatus'|'createdAt'|'name',
                'values': [
                    'string',
                ]
            },
        ],
        'includes': [
            {
                'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS',
                'key': 'jobType'|'jobStatus'|'createdAt'|'name',
                'values': [
                    'string',
                ]
            },
        ]
    },
    maxResults=123,
    nextToken='string',
    sortCriteria={
        'attributeName': 'createdAt'|'jobStatus'|'name'|'jobType',
        'orderBy': 'ASC'|'DESC'
    }
)
type filterCriteria

dict

param filterCriteria

The criteria to use to filter the results.

  • excludes (list) --

    An array of objects, one for each condition that determines which jobs to exclude from the results.

    • (dict) --

      Specifies a condition that filters the results of a request for information about classification jobs. Each condition consists of a property, an operator, and one or more values.

      • comparator (string) --

        The operator to use to filter the results.

      • key (string) --

        The property to use to filter the results.

      • values (list) --

        An array that lists one or more values to use to filter the results.

        • (string) --

  • includes (list) --

    An array of objects, one for each condition that determines which jobs to include in the results.

    • (dict) --

      Specifies a condition that filters the results of a request for information about classification jobs. Each condition consists of a property, an operator, and one or more values.

      • comparator (string) --

        The operator to use to filter the results.

      • key (string) --

        The property to use to filter the results.

      • values (list) --

        An array that lists one or more values to use to filter the results.

        • (string) --

type maxResults

integer

param maxResults

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

type nextToken

string

param nextToken

The nextToken string that specifies which page of results to return in a paginated response.

type sortCriteria

dict

param sortCriteria

The criteria to use to sort the results.

  • attributeName (string) --

    The property to sort the results by.

  • orderBy (string) --

    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.

rtype

dict

returns

Response Syntax

{
    'items': [
        {
            'bucketDefinitions': [
                {
                    'accountId': 'string',
                    'buckets': [
                        'string',
                    ]
                },
            ],
            'createdAt': datetime(2015, 1, 1),
            'jobId': 'string',
            'jobStatus': 'RUNNING'|'PAUSED'|'CANCELLED'|'COMPLETE'|'IDLE'|'USER_PAUSED',
            'jobType': 'ONE_TIME'|'SCHEDULED',
            'name': 'string',
            'userPausedDetails': {
                'jobExpiresAt': datetime(2015, 1, 1),
                'jobImminentExpirationHealthEventArn': 'string',
                'jobPausedAt': datetime(2015, 1, 1)
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The request succeeded.

    • items (list) --

      An array of objects, one for each job that meets the filter criteria specified in the request.

      • (dict) --

        Provides information about a classification job, including the current status of the job.

        • bucketDefinitions (list) --

          The S3 buckets that the job is configured to analyze.

          • (dict) --

            Specifies which S3 buckets contain the objects that a classification job analyzes.

            • accountId (string) --

              The unique identifier for the AWS account that owns one or more of the buckets. If specified, the job analyzes objects in all the buckets that are owned by the account and meet other conditions specified for the job.

            • buckets (list) --

              An array that lists the names of the buckets.

              • (string) --

        • createdAt (datetime) --

          The date and time, in UTC and extended ISO 8601 format, when the job was created.

        • jobId (string) --

          The unique identifier for the job.

        • jobStatus (string) --

          The current status of the job. Possible values are:

          • CANCELLED - You cancelled the job, or you paused the job and didn't resume it within 30 days of pausing it.

          • COMPLETE - For a one-time job, Amazon Macie finished processing all the data specified for the job. This value doesn't apply to recurring jobs.

          • IDLE - For a recurring job, the previous scheduled run is complete and the next scheduled run is pending. This value doesn't apply to one-time jobs.

          • PAUSED - Amazon Macie started running the job but completion of the job would exceed one or more quotas for your account.

          • RUNNING - For a one-time job, the job is in progress. For a recurring job, a scheduled run is in progress.

          • USER_PAUSED - You paused the job. If you don't resume the job within 30 days of pausing it, the job will expire and be cancelled.

        • jobType (string) --

          The schedule for running the job. Possible values are:

          • ONE_TIME - The job runs only once.

          • SCHEDULED - The job runs on a daily, weekly, or monthly basis.

        • name (string) --

          The custom name of the job.

        • userPausedDetails (dict) --

          If the current status of the job is USER_PAUSED, specifies when the job was paused and when the job will expire and be cancelled if it isn't resumed. This value is present only if the value for jobStatus is USER_PAUSED.

          • jobExpiresAt (datetime) --

            The date and time, in UTC and extended ISO 8601 format, when the job will expire and be cancelled if you don't resume it first. If you don't resume a job within 30 days of pausing it, the job expires and Amazon Macie cancels it.

          • jobImminentExpirationHealthEventArn (string) --

            The Amazon Resource Name (ARN) of the AWS Health event that Amazon Macie sent to notify you of the job's pending expiration and cancellation. This value is null if a job has been paused for less than 23 days.

          • jobPausedAt (datetime) --

            The date and time, in UTC and extended ISO 8601 format, when you paused the job.

    • nextToken (string) --

      The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.

UpdateClassificationJob (updated) Link ¶
Changes (request)
{'jobStatus': {'USER_PAUSED'}}

Changes the status of a classification job.

See also: AWS API Documentation

Request Syntax

client.update_classification_job(
    jobId='string',
    jobStatus='RUNNING'|'PAUSED'|'CANCELLED'|'COMPLETE'|'IDLE'|'USER_PAUSED'
)
type jobId

string

param jobId

[REQUIRED]

The unique identifier for the classification job.

type jobStatus

string

param jobStatus

[REQUIRED]

The new status for the job. Valid values are:

  • CANCELLED - Stops the job permanently and cancels it. You can't resume a job after you cancel it. This value is valid only if the job's current status is IDLE, PAUSED, RUNNING, or USER_PAUSED.

  • RUNNING - Resumes the job. This value is valid only if the job's current status is USER_PAUSED. If you specify this value, Amazon Macie immediately resumes the job.

  • USER_PAUSED - Pauses the job. This value is valid only if the job's current status is IDLE or RUNNING. If you specify this value and the job is currently running, Macie immediately stops running the job. To resume a job after you pause it, change the job's status to RUNNING. If you don't resume a job within 30 days of pausing it, the job expires and Macie cancels it. You can't resume a job after it's cancelled.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    The request succeeded. The job's status was changed and there isn't any content to include in the body of the response (No Content).