2022/08/30 - Amazon Macie 2 - 5 new2 updated api methods
Changes This release of the Amazon Macie API adds support for using allow lists to define specific text and text patterns to ignore when inspecting data sources for sensitive data.
Creates and defines the settings for an allow list.
See also: AWS API Documentation
Request Syntax
client.create_allow_list( clientToken='string', criteria={ 'regex': 'string', 's3WordsList': { 'bucketName': 'string', 'objectKey': 'string' } }, description='string', name='string', tags={ 'string': 'string' } )
string
[REQUIRED]
A unique, case-sensitive token that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
dict
[REQUIRED]
The criteria that specify the text or text pattern to ignore. The criteria can be the location and name of an S3 object that lists specific text to ignore (s3WordsList), or a regular expression (regex) that defines a text pattern to ignore.
regex (string) --
The regular expression (regex) that defines the text pattern to ignore. The expression can contain as many as 512 characters.
s3WordsList (dict) --
The location and name of the S3 object that lists specific text to ignore.
bucketName (string) -- [REQUIRED]
The full name of the S3 bucket that contains the object.
objectKey (string) -- [REQUIRED]
The full name (key) of the object.
string
A custom description of the allow list. The description can contain as many as 512 characters.
string
[REQUIRED]
A custom name for the allow list. The name can contain as many as 128 characters.
dict
A map of key-value pairs that specifies the tags to associate with the allow list.
An allow list can have a maximum of 50 tags. Each tag consists of a tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.
(string) --
(string) --
dict
Response Syntax
{ 'arn': 'string', 'id': 'string' }
Response Structure
(dict) --
The request succeeded. The specified allow list was created.
arn (string) --
The Amazon Resource Name (ARN) of the allow list.
id (string) --
The unique identifier for the allow list.
Deletes an allow list.
See also: AWS API Documentation
Request Syntax
client.delete_allow_list( id='string', ignoreJobChecks='string' )
string
[REQUIRED]
The unique identifier for the Amazon Macie resource that the request applies to.
string
Specifies whether to force deletion of the allow list, even if active classification jobs are configured to use the list.
When you try to delete an allow list, Amazon Macie checks for classification jobs that use the list and have a status other than COMPLETE or CANCELLED. By default, Macie rejects your request if any jobs meet these criteria. To skip these checks and delete the list, set this value to true. To delete the list only if no active jobs are configured to use it, set this value to false.
dict
Response Syntax
{}
Response Structure
(dict) --
The request succeeded. The allow list was deleted and there isn't any content to include in the body of the response (No Content).
Retrieves a subset of information about all the allow lists for an account.
See also: AWS API Documentation
Request Syntax
client.list_allow_lists( maxResults=123, nextToken='string' )
integer
The maximum number of items to include in each page of a paginated response.
string
The nextToken string that specifies which page of results to return in a paginated response.
dict
Response Syntax
{ 'allowLists': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'description': 'string', 'id': 'string', 'name': 'string', 'updatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
The request succeeded.
allowLists (list) --
An array of objects, one for each allow list.
(dict) --
Provides a subset of information about an allow list.
arn (string) --
The Amazon Resource Name (ARN) of the allow list.
createdAt (datetime) --
The date and time, in UTC and extended ISO 8601 format, when the allow list was created in Amazon Macie.
description (string) --
The custom description of the allow list.
id (string) --
The unique identifier for the allow list.
name (string) --
The custom name of the allow list.
updatedAt (datetime) --
The date and time, in UTC and extended ISO 8601 format, when the allow list's settings were most recently changed in Amazon Macie.
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.
Updates the settings for an allow list.
See also: AWS API Documentation
Request Syntax
client.update_allow_list( criteria={ 'regex': 'string', 's3WordsList': { 'bucketName': 'string', 'objectKey': 'string' } }, description='string', id='string', name='string' )
dict
[REQUIRED]
The criteria that specify the text or text pattern to ignore. The criteria can be the location and name of an S3 object that lists specific text to ignore (s3WordsList), or a regular expression that defines a text pattern to ignore (regex).
You can change a list's underlying criteria, such as the name of the S3 object or the regular expression to use. However, you can't change the type from s3WordsList to regex or the other way around.
regex (string) --
The regular expression (regex) that defines the text pattern to ignore. The expression can contain as many as 512 characters.
s3WordsList (dict) --
The location and name of the S3 object that lists specific text to ignore.
bucketName (string) -- [REQUIRED]
The full name of the S3 bucket that contains the object.
objectKey (string) -- [REQUIRED]
The full name (key) of the object.
string
A custom description of the allow list. The description can contain as many as 512 characters.
string
[REQUIRED]
The unique identifier for the Amazon Macie resource that the request applies to.
string
[REQUIRED]
A custom name for the allow list. The name can contain as many as 128 characters.
dict
Response Syntax
{ 'arn': 'string', 'id': 'string' }
Response Structure
(dict) --
The request succeeded. The settings for the allow list were updated.
arn (string) --
The Amazon Resource Name (ARN) of the allow list.
id (string) --
The unique identifier for the allow list.
Retrieves the settings and status of an allow list.
See also: AWS API Documentation
Request Syntax
client.get_allow_list( id='string' )
string
[REQUIRED]
The unique identifier for the Amazon Macie resource that the request applies to.
dict
Response Syntax
{ 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'criteria': { 'regex': 'string', 's3WordsList': { 'bucketName': 'string', 'objectKey': 'string' } }, 'description': 'string', 'id': 'string', 'name': 'string', 'status': { 'code': 'OK'|'S3_OBJECT_NOT_FOUND'|'S3_USER_ACCESS_DENIED'|'S3_OBJECT_ACCESS_DENIED'|'S3_THROTTLED'|'S3_OBJECT_OVERSIZE'|'S3_OBJECT_EMPTY'|'UNKNOWN_ERROR', 'description': 'string' }, 'tags': { 'string': 'string' }, 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) --
The request succeeded.
arn (string) --
The Amazon Resource Name (ARN) of the allow list.
createdAt (datetime) --
The date and time, in UTC and extended ISO 8601 format, when the allow list was created in Amazon Macie.
criteria (dict) --
The criteria that specify the text or text pattern to ignore. The criteria can be the location and name of an S3 object that lists specific text to ignore (s3WordsList), or a regular expression (regex) that defines a text pattern to ignore.
regex (string) --
The regular expression (regex) that defines the text pattern to ignore. The expression can contain as many as 512 characters.
s3WordsList (dict) --
The location and name of the S3 object that lists specific text to ignore.
bucketName (string) --
The full name of the S3 bucket that contains the object.
objectKey (string) --
The full name (key) of the object.
description (string) --
The custom description of the allow list.
id (string) --
The unique identifier for the allow list.
name (string) --
The custom name of the allow list.
status (dict) --
The current status of the allow list, which indicates whether Amazon Macie can access and use the list's criteria.
code (string) --
The current status of the allow list. If the list's criteria specify a regular expression (regex), this value is typically OK. Amazon Macie can compile the expression.
If the list's criteria specify an S3 object, possible values are:
OK - Macie can retrieve and parse the contents of the object.
S3_OBJECT_ACCESS_DENIED - Macie isn't allowed to access the object or the object is encrypted with a customer managed KMS key that Macie isn't allowed to use. Check the bucket policy and other permissions settings for the bucket and the object. If the object is encrypted, also ensure that it's encrypted with a key that Macie is allowed to use.
S3_OBJECT_EMPTY - Macie can retrieve the object but the object doesn't contain any content. Ensure that the object contains the correct entries. Also ensure that the list's criteria specify the correct bucket and object names.
S3_OBJECT_NOT_FOUND - The object doesn't exist in Amazon S3. Ensure that the list's criteria specify the correct bucket and object names.
S3_OBJECT_OVERSIZE - Macie can retrieve the object. However, the object contains too many entries or its storage size exceeds the quota for an allow list. Try breaking the list into multiple files and ensure that each file doesn't exceed any quotas. Then configure list settings in Macie for each file.
S3_THROTTLED - Amazon S3 throttled the request to retrieve the object. Wait a few minutes and then try again.
S3_USER_ACCESS_DENIED - Amazon S3 denied the request to retrieve the object. If the specified object exists, you're not allowed to access it or it's encrypted with an KMS key that you're not allowed to use. Work with your Amazon Web Services administrator to ensure that the list's criteria specify the correct bucket and object names, and you have read access to the bucket and the object. If the object is encrypted, also ensure that it's encrypted with a key that you're allowed to use.
UNKNOWN_ERROR - A transient or internal error occurred when Macie attempted to retrieve or parse the object. Wait a few minutes and then try again. A list can also have this status if it's encrypted with a key that Amazon S3 and Macie can't access or use.
description (string) --
A brief description of the status of the allow list. Amazon Macie uses this value to provide additional information about an error that occurred when Macie tried to access and use the list's criteria.
tags (dict) --
A map of key-value pairs that specifies which tags (keys and values) are associated with the allow list.
(string) --
(string) --
updatedAt (datetime) --
The date and time, in UTC and extended ISO 8601 format, when the allow list's settings were most recently changed in Amazon Macie.
{'allowListIds': ['string']}
Creates and defines the settings for a classification job.
See also: AWS API Documentation
Request Syntax
client.create_classification_job( allowListIds=[ 'string', ], clientToken='string', customDataIdentifierIds=[ 'string', ], description='string', initialRun=True|False, jobType='ONE_TIME'|'SCHEDULED', managedDataIdentifierIds=[ 'string', ], managedDataIdentifierSelector='ALL'|'EXCLUDE'|'INCLUDE'|'NONE', name='string', s3JobDefinition={ 'bucketDefinitions': [ { 'accountId': 'string', 'buckets': [ 'string', ] }, ], 'scoping': { 'excludes': { 'and': [ { 'simpleScopeTerm': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'OBJECT_EXTENSION'|'OBJECT_LAST_MODIFIED_DATE'|'OBJECT_SIZE'|'OBJECT_KEY', 'values': [ 'string', ] }, 'tagScopeTerm': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'string', 'tagValues': [ { 'key': 'string', 'value': 'string' }, ], 'target': 'S3_OBJECT' } }, ] }, 'includes': { 'and': [ { 'simpleScopeTerm': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'OBJECT_EXTENSION'|'OBJECT_LAST_MODIFIED_DATE'|'OBJECT_SIZE'|'OBJECT_KEY', 'values': [ 'string', ] }, 'tagScopeTerm': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'string', 'tagValues': [ { 'key': 'string', 'value': 'string' }, ], 'target': 'S3_OBJECT' } }, ] } }, 'bucketCriteria': { 'excludes': { 'and': [ { 'simpleCriterion': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'ACCOUNT_ID'|'S3_BUCKET_NAME'|'S3_BUCKET_EFFECTIVE_PERMISSION'|'S3_BUCKET_SHARED_ACCESS', 'values': [ 'string', ] }, 'tagCriterion': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'tagValues': [ { 'key': 'string', 'value': 'string' }, ] } }, ] }, 'includes': { 'and': [ { 'simpleCriterion': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'ACCOUNT_ID'|'S3_BUCKET_NAME'|'S3_BUCKET_EFFECTIVE_PERMISSION'|'S3_BUCKET_SHARED_ACCESS', 'values': [ 'string', ] }, 'tagCriterion': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'tagValues': [ { 'key': 'string', 'value': 'string' }, ] } }, ] } } }, samplingPercentage=123, scheduleFrequency={ 'dailySchedule': {} , 'monthlySchedule': { 'dayOfMonth': 123 }, 'weeklySchedule': { 'dayOfWeek': 'SUNDAY'|'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY' } }, tags={ 'string': 'string' } )
list
An array of unique identifiers, one for each allow list for the job to use when it analyzes data.
(string) --
string
[REQUIRED]
A unique, case-sensitive token that you provide to ensure the idempotency of the request.
This field is autopopulated if not provided.
list
An array of unique identifiers, one for each custom data identifier for the job to use when it analyzes data. To use only managed data identifiers, don't specify a value for this property and specify a value other than NONE for the managedDataIdentifierSelector property.
(string) --
string
A custom description of the job. The description can contain as many as 200 characters.
boolean
For a recurring job, specifies whether to analyze all existing, eligible objects immediately after the job is created (true). To analyze only those objects that are created or changed after you create the job and before the job's first scheduled run, set this value to false.
If you configure the job to run only once, don't specify a value for this property.
string
[REQUIRED]
The schedule for running the job. Valid values are:
ONE_TIME - Run the job only once. If you specify this value, don't specify a value for the scheduleFrequency property.
SCHEDULED - Run the job on a daily, weekly, or monthly basis. If you specify this value, use the scheduleFrequency property to define the recurrence pattern for the job.
list
An array of unique identifiers, one for each managed data identifier for the job to include (use) or exclude (not use) when it analyzes data. Inclusion or exclusion depends on the managed data identifier selection type that you specify for the job (managedDataIdentifierSelector).
To retrieve a list of valid values for this property, use the ListManagedDataIdentifiers operation.
(string) --
string
The selection type to apply when determining which managed data identifiers the job uses to analyze data. Valid values are:
ALL - Use all the managed data identifiers that Amazon Macie provides. If you specify this value, don't specify any values for the managedDataIdentifierIds property.
EXCLUDE - Use all the managed data identifiers that Macie provides except the managed data identifiers specified by the managedDataIdentifierIds property.
INCLUDE - Use only the managed data identifiers specified by the managedDataIdentifierIds property.
NONE - Don't use any managed data identifiers. If you specify this value, specify at least one custom data identifier for the job (customDataIdentifierIds) and don't specify any values for the managedDataIdentifierIds property.
If you don't specify a value for this property, the job uses all managed data identifiers. If you don't specify a value for this property or you specify ALL or EXCLUDE for a recurring job, the job also uses new managed data identifiers as they are released.
string
[REQUIRED]
A custom name for the job. The name can contain as many as 500 characters.
dict
[REQUIRED]
The S3 buckets that contain the objects to analyze, and the scope of that analysis.
bucketDefinitions (list) --
An array of objects, one for each Amazon Web Services account that owns specific S3 buckets to analyze. Each object specifies the account ID for an account and one or more buckets to analyze for that account. A job's definition can contain a bucketDefinitions array or a bucketCriteria object, not both.
(dict) --
Specifies an Amazon Web Services account that owns S3 buckets for a classification job to analyze, and one or more specific buckets to analyze for that account.
accountId (string) -- [REQUIRED]
The unique identifier for the Amazon Web Services account that owns the buckets.
buckets (list) -- [REQUIRED]
An array that lists the names of the buckets.
(string) --
scoping (dict) --
The property- and tag-based conditions that determine which S3 objects to include or exclude from the analysis. Each time the job runs, the job uses these criteria to determine which objects to analyze.
excludes (dict) --
The property- and tag-based conditions that determine which objects to exclude from the analysis.
and (list) --
An array of conditions, one for each property- or tag-based condition that determines which objects to include or exclude from the job. If you specify more than one condition, Amazon Macie uses AND logic to join the conditions.
(dict) --
Specifies a property- or tag-based condition that defines criteria for including or excluding S3 objects from a classification job. A JobScopeTerm object can contain only one simpleScopeTerm object or one tagScopeTerm object.
simpleScopeTerm (dict) --
A property-based condition that defines a property, operator, and one or more values for including or excluding objects from the job.
comparator (string) --
The operator to use in the condition. Valid values for each supported property (key) are:
OBJECT_EXTENSION - EQ (equals) or NE (not equals)
OBJECT_KEY - STARTS_WITH
OBJECT_LAST_MODIFIED_DATE - Any operator except CONTAINS
OBJECT_SIZE - Any operator except CONTAINS
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 or OBJECT_KEY, this array can specify multiple values and Amazon Macie uses OR logic 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: docx or pdf
OBJECT_KEY - A string that represents the key prefix (folder name or path) of an object. For example: logs or awslogs/eventlogs. This value applies a condition to objects whose keys (names) begin with the specified value.
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.
Macie doesn't support use of wildcard characters in these values. Also, string values are case sensitive.
(string) --
tagScopeTerm (dict) --
A tag-based condition that defines the operator and tag keys or tag key and value pairs for including or excluding objects from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) or NE (not equals).
key (string) --
The object property to use in the condition. The only valid value is TAG.
tagValues (list) --
The tag keys or tag key and value pairs to use in the condition. To specify only tag keys in a condition, specify the keys in this array and set the value for each associated tag value to an empty string.
(dict) --
Specifies a tag key or tag key and value pair to use in a tag-based condition that determines whether an S3 object is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.
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- and tag-based conditions that determine which objects to include in the analysis.
and (list) --
An array of conditions, one for each property- or tag-based condition that determines which objects to include or exclude from the job. If you specify more than one condition, Amazon Macie uses AND logic to join the conditions.
(dict) --
Specifies a property- or tag-based condition that defines criteria for including or excluding S3 objects from a classification job. A JobScopeTerm object can contain only one simpleScopeTerm object or one tagScopeTerm object.
simpleScopeTerm (dict) --
A property-based condition that defines a property, operator, and one or more values for including or excluding objects from the job.
comparator (string) --
The operator to use in the condition. Valid values for each supported property (key) are:
OBJECT_EXTENSION - EQ (equals) or NE (not equals)
OBJECT_KEY - STARTS_WITH
OBJECT_LAST_MODIFIED_DATE - Any operator except CONTAINS
OBJECT_SIZE - Any operator except CONTAINS
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 or OBJECT_KEY, this array can specify multiple values and Amazon Macie uses OR logic 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: docx or pdf
OBJECT_KEY - A string that represents the key prefix (folder name or path) of an object. For example: logs or awslogs/eventlogs. This value applies a condition to objects whose keys (names) begin with the specified value.
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.
Macie doesn't support use of wildcard characters in these values. Also, string values are case sensitive.
(string) --
tagScopeTerm (dict) --
A tag-based condition that defines the operator and tag keys or tag key and value pairs for including or excluding objects from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) or NE (not equals).
key (string) --
The object property to use in the condition. The only valid value is TAG.
tagValues (list) --
The tag keys or tag key and value pairs to use in the condition. To specify only tag keys in a condition, specify the keys in this array and set the value for each associated tag value to an empty string.
(dict) --
Specifies a tag key or tag key and value pair to use in a tag-based condition that determines whether an S3 object is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.
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.
bucketCriteria (dict) --
The property- and tag-based conditions that determine which S3 buckets to include or exclude from the analysis. Each time the job runs, the job uses these criteria to determine which buckets contain objects to analyze. A job's definition can contain a bucketCriteria object or a bucketDefinitions array, not both.
excludes (dict) --
The property- and tag-based conditions that determine which buckets to exclude from the job.
and (list) --
An array of conditions, one for each condition that determines which buckets to include or exclude from the job. If you specify more than one condition, Amazon Macie uses AND logic to join the conditions.
(dict) --
Specifies a property- or tag-based condition that defines criteria for including or excluding S3 buckets from a classification job.
simpleCriterion (dict) --
A property-based condition that defines a property, operator, and one or more values for including or excluding buckets from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) and NE (not equals).
key (string) --
The property to use in the condition.
values (list) --
An array that lists one or more values to use in the condition. If you specify multiple values, Amazon Macie uses OR logic to join the values. Valid values for each supported property (key) are:
ACCOUNT_ID - A string that represents the unique identifier for the Amazon Web Services account that owns the bucket.
S3_BUCKET_EFFECTIVE_PERMISSION - A string that represents an enumerated value that Macie defines for the BucketPublicAccess.effectivePermission property of a bucket.
S3_BUCKET_NAME - A string that represents the name of a bucket.
S3_BUCKET_SHARED_ACCESS - A string that represents an enumerated value that Macie defines for the BucketMetadata.sharedAccess property of a bucket.
Values are case sensitive. Also, Macie doesn't support use of partial values or wildcard characters in these values.
(string) --
tagCriterion (dict) --
A tag-based condition that defines an operator and tag keys, tag values, or tag key and value pairs for including or excluding buckets from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) and NE (not equals).
tagValues (list) --
The tag keys, tag values, or tag key and value pairs to use in the condition.
(dict) --
Specifies a tag key, a tag value, or a tag key and value (as a pair) to use in a tag-based condition that determines whether an S3 bucket is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.
key (string) --
The value for the tag key to use in the condition.
value (string) --
The tag value to use in the condition.
includes (dict) --
The property- and tag-based conditions that determine which buckets to include in the job.
and (list) --
An array of conditions, one for each condition that determines which buckets to include or exclude from the job. If you specify more than one condition, Amazon Macie uses AND logic to join the conditions.
(dict) --
Specifies a property- or tag-based condition that defines criteria for including or excluding S3 buckets from a classification job.
simpleCriterion (dict) --
A property-based condition that defines a property, operator, and one or more values for including or excluding buckets from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) and NE (not equals).
key (string) --
The property to use in the condition.
values (list) --
An array that lists one or more values to use in the condition. If you specify multiple values, Amazon Macie uses OR logic to join the values. Valid values for each supported property (key) are:
ACCOUNT_ID - A string that represents the unique identifier for the Amazon Web Services account that owns the bucket.
S3_BUCKET_EFFECTIVE_PERMISSION - A string that represents an enumerated value that Macie defines for the BucketPublicAccess.effectivePermission property of a bucket.
S3_BUCKET_NAME - A string that represents the name of a bucket.
S3_BUCKET_SHARED_ACCESS - A string that represents an enumerated value that Macie defines for the BucketMetadata.sharedAccess property of a bucket.
Values are case sensitive. Also, Macie doesn't support use of partial values or wildcard characters in these values.
(string) --
tagCriterion (dict) --
A tag-based condition that defines an operator and tag keys, tag values, or tag key and value pairs for including or excluding buckets from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) and NE (not equals).
tagValues (list) --
The tag keys, tag values, or tag key and value pairs to use in the condition.
(dict) --
Specifies a tag key, a tag value, or a tag key and value (as a pair) to use in a tag-based condition that determines whether an S3 bucket is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.
key (string) --
The value for the tag key to use in the condition.
value (string) --
The tag value to use in the condition.
integer
The sampling depth, as a percentage, for the job to apply when processing objects. This value determines the percentage of eligible objects that the job analyzes. If this value is less than 100, Amazon Macie selects the objects to analyze at random, up to the specified percentage, and analyzes all the data in those objects.
dict
The recurrence pattern for running the job. To run the job only once, don't specify a value for this property and set the value for the jobType property to ONE_TIME.
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 doesn't run the job that month. Macie runs the job only during months that have the specified day. For example, if this value is 31 and a month has only 30 days, Macie doesn't run the job that month. To run the job every month, specify a value that's less than 29.
weeklySchedule (dict) --
Specifies a weekly recurrence pattern for running the job.
dayOfWeek (string) --
The day of the week when Amazon Macie runs the job.
dict
A map of key-value pairs that specifies the tags to associate with the job.
A job can have a maximum of 50 tags. Each tag consists of a tag key and an associated tag value. The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.
(string) --
(string) --
dict
Response Syntax
{ 'jobArn': 'string', 'jobId': 'string' }
Response Structure
(dict) --
The request succeeded. The specified job was created.
jobArn (string) --
The Amazon Resource Name (ARN) of the job.
jobId (string) --
The unique identifier for the job.
{'allowListIds': ['string']}
Retrieves the status and settings for a classification job.
See also: AWS API Documentation
Request Syntax
client.describe_classification_job( jobId='string' )
string
[REQUIRED]
The unique identifier for the classification job.
dict
Response Syntax
{ 'allowListIds': [ 'string', ], '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', 'lastRunErrorStatus': { 'code': 'NONE'|'ERROR' }, 'lastRunTime': datetime(2015, 1, 1), 'managedDataIdentifierIds': [ 'string', ], 'managedDataIdentifierSelector': 'ALL'|'EXCLUDE'|'INCLUDE'|'NONE', 'name': 'string', 's3JobDefinition': { 'bucketDefinitions': [ { 'accountId': 'string', 'buckets': [ 'string', ] }, ], 'scoping': { 'excludes': { 'and': [ { 'simpleScopeTerm': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'OBJECT_EXTENSION'|'OBJECT_LAST_MODIFIED_DATE'|'OBJECT_SIZE'|'OBJECT_KEY', 'values': [ 'string', ] }, 'tagScopeTerm': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'string', 'tagValues': [ { 'key': 'string', 'value': 'string' }, ], 'target': 'S3_OBJECT' } }, ] }, 'includes': { 'and': [ { 'simpleScopeTerm': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'OBJECT_EXTENSION'|'OBJECT_LAST_MODIFIED_DATE'|'OBJECT_SIZE'|'OBJECT_KEY', 'values': [ 'string', ] }, 'tagScopeTerm': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'string', 'tagValues': [ { 'key': 'string', 'value': 'string' }, ], 'target': 'S3_OBJECT' } }, ] } }, 'bucketCriteria': { 'excludes': { 'and': [ { 'simpleCriterion': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'ACCOUNT_ID'|'S3_BUCKET_NAME'|'S3_BUCKET_EFFECTIVE_PERMISSION'|'S3_BUCKET_SHARED_ACCESS', 'values': [ 'string', ] }, 'tagCriterion': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'tagValues': [ { 'key': 'string', 'value': 'string' }, ] } }, ] }, 'includes': { 'and': [ { 'simpleCriterion': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'key': 'ACCOUNT_ID'|'S3_BUCKET_NAME'|'S3_BUCKET_EFFECTIVE_PERMISSION'|'S3_BUCKET_SHARED_ACCESS', 'values': [ 'string', ] }, 'tagCriterion': { 'comparator': 'EQ'|'GT'|'GTE'|'LT'|'LTE'|'NE'|'CONTAINS'|'STARTS_WITH', 'tagValues': [ { 'key': 'string', 'value': 'string' }, ] } }, ] } } }, '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.
allowListIds (list) --
An array of unique identifiers, one for each allow list that the job uses when it analyzes data.
(string) --
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) --
An array of unique identifiers, one for each custom data identifier that the job uses when it analyzes data. This value is null if the job uses only managed data identifiers to analyze data.
(string) --
description (string) --
The custom description of the job.
initialRun (boolean) --
For a recurring job, specifies whether you configured the job to analyze all existing, eligible objects immediately after the job was created (true). If you configured the job to analyze only those objects that were created or changed after the job was created and before the job's first scheduled run, this value is false. This value is also false for a one-time job.
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, if it's a one-time job, you paused the job and didn't resume it within 30 days.
COMPLETE - For a one-time job, Amazon Macie finished processing 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 - Macie started running the job but additional processing would exceed the monthly sensitive data discovery quota for your account or one or more member accounts that the job analyzes data for.
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 paused the job while it had a status of RUNNING and you don't resume it within 30 days of pausing it, the job or job run will expire and be cancelled, depending on the job's type. To check the expiration date, refer to the UserPausedDetails.jobExpiresAt property.
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.
lastRunErrorStatus (dict) --
Specifies whether any account- or bucket-level access errors occurred when the job ran. For a recurring job, this value indicates the error status of the job's most recent run.
code (string) --
Specifies whether any account- or bucket-level access errors occurred when the job ran. For a recurring job, this value indicates the error status of the job's most recent run. Possible values are:
ERROR - One or more errors occurred. Amazon Macie didn't process all the data specified for the job.
NONE - No errors occurred. Macie processed all the data specified for the job.
lastRunTime (datetime) --
The date and time, in UTC and extended ISO 8601 format, when the job started. If the job is a recurring job, this value indicates when the most recent run started or, if the job hasn't run yet, when the job was created.
managedDataIdentifierIds (list) --
An array of unique identifiers, one for each managed data identifier that the job is explicitly configured to include (use) or exclude (not use) when it analyzes data. Inclusion or exclusion depends on the managed data identifier selection type specified for the job (managedDataIdentifierSelector). This value is null if the job's managed data identifier selection type is ALL or the job uses only custom data identifiers (customDataIdentifierIds) to analyze data.
(string) --
managedDataIdentifierSelector (string) --
The selection type that determines which managed data identifiers the job uses to analyze data. Possible values are:
ALL - Use all the managed data identifiers that Amazon Macie provides.
EXCLUDE - Use all the managed data identifiers that Macie provides except the managed data identifiers specified by the managedDataIdentifierIds property.
INCLUDE - Use only the managed data identifiers specified by the managedDataIdentifierIds property.
NONE - Don't use any managed data identifiers.
If this value is null, the job uses all managed data identifiers. If this value is null, ALL, or EXCLUDE for a recurring job, the job also uses new managed data identifiers as they are released.
name (string) --
The custom name of the job.
s3JobDefinition (dict) --
The S3 buckets that contain the objects to analyze, and the scope of that analysis.
bucketDefinitions (list) --
An array of objects, one for each Amazon Web Services account that owns specific S3 buckets to analyze. Each object specifies the account ID for an account and one or more buckets to analyze for that account. A job's definition can contain a bucketDefinitions array or a bucketCriteria object, not both.
(dict) --
Specifies an Amazon Web Services account that owns S3 buckets for a classification job to analyze, and one or more specific buckets to analyze for that account.
accountId (string) --
The unique identifier for the Amazon Web Services account that owns the buckets.
buckets (list) --
An array that lists the names of the buckets.
(string) --
scoping (dict) --
The property- and tag-based conditions that determine which S3 objects to include or exclude from the analysis. Each time the job runs, the job uses these criteria to determine which objects to analyze.
excludes (dict) --
The property- and tag-based conditions that determine which objects to exclude from the analysis.
and (list) --
An array of conditions, one for each property- or tag-based condition that determines which objects to include or exclude from the job. If you specify more than one condition, Amazon Macie uses AND logic to join the conditions.
(dict) --
Specifies a property- or tag-based condition that defines criteria for including or excluding S3 objects from a classification job. A JobScopeTerm object can contain only one simpleScopeTerm object or one tagScopeTerm object.
simpleScopeTerm (dict) --
A property-based condition that defines a property, operator, and one or more values for including or excluding objects from the job.
comparator (string) --
The operator to use in the condition. Valid values for each supported property (key) are:
OBJECT_EXTENSION - EQ (equals) or NE (not equals)
OBJECT_KEY - STARTS_WITH
OBJECT_LAST_MODIFIED_DATE - Any operator except CONTAINS
OBJECT_SIZE - Any operator except CONTAINS
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 or OBJECT_KEY, this array can specify multiple values and Amazon Macie uses OR logic 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: docx or pdf
OBJECT_KEY - A string that represents the key prefix (folder name or path) of an object. For example: logs or awslogs/eventlogs. This value applies a condition to objects whose keys (names) begin with the specified value.
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.
Macie doesn't support use of wildcard characters in these values. Also, string values are case sensitive.
(string) --
tagScopeTerm (dict) --
A tag-based condition that defines the operator and tag keys or tag key and value pairs for including or excluding objects from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) or NE (not equals).
key (string) --
The object property to use in the condition. The only valid value is TAG.
tagValues (list) --
The tag keys or tag key and value pairs to use in the condition. To specify only tag keys in a condition, specify the keys in this array and set the value for each associated tag value to an empty string.
(dict) --
Specifies a tag key or tag key and value pair to use in a tag-based condition that determines whether an S3 object is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.
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- and tag-based conditions that determine which objects to include in the analysis.
and (list) --
An array of conditions, one for each property- or tag-based condition that determines which objects to include or exclude from the job. If you specify more than one condition, Amazon Macie uses AND logic to join the conditions.
(dict) --
Specifies a property- or tag-based condition that defines criteria for including or excluding S3 objects from a classification job. A JobScopeTerm object can contain only one simpleScopeTerm object or one tagScopeTerm object.
simpleScopeTerm (dict) --
A property-based condition that defines a property, operator, and one or more values for including or excluding objects from the job.
comparator (string) --
The operator to use in the condition. Valid values for each supported property (key) are:
OBJECT_EXTENSION - EQ (equals) or NE (not equals)
OBJECT_KEY - STARTS_WITH
OBJECT_LAST_MODIFIED_DATE - Any operator except CONTAINS
OBJECT_SIZE - Any operator except CONTAINS
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 or OBJECT_KEY, this array can specify multiple values and Amazon Macie uses OR logic 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: docx or pdf
OBJECT_KEY - A string that represents the key prefix (folder name or path) of an object. For example: logs or awslogs/eventlogs. This value applies a condition to objects whose keys (names) begin with the specified value.
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.
Macie doesn't support use of wildcard characters in these values. Also, string values are case sensitive.
(string) --
tagScopeTerm (dict) --
A tag-based condition that defines the operator and tag keys or tag key and value pairs for including or excluding objects from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) or NE (not equals).
key (string) --
The object property to use in the condition. The only valid value is TAG.
tagValues (list) --
The tag keys or tag key and value pairs to use in the condition. To specify only tag keys in a condition, specify the keys in this array and set the value for each associated tag value to an empty string.
(dict) --
Specifies a tag key or tag key and value pair to use in a tag-based condition that determines whether an S3 object is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.
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.
bucketCriteria (dict) --
The property- and tag-based conditions that determine which S3 buckets to include or exclude from the analysis. Each time the job runs, the job uses these criteria to determine which buckets contain objects to analyze. A job's definition can contain a bucketCriteria object or a bucketDefinitions array, not both.
excludes (dict) --
The property- and tag-based conditions that determine which buckets to exclude from the job.
and (list) --
An array of conditions, one for each condition that determines which buckets to include or exclude from the job. If you specify more than one condition, Amazon Macie uses AND logic to join the conditions.
(dict) --
Specifies a property- or tag-based condition that defines criteria for including or excluding S3 buckets from a classification job.
simpleCriterion (dict) --
A property-based condition that defines a property, operator, and one or more values for including or excluding buckets from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) and NE (not equals).
key (string) --
The property to use in the condition.
values (list) --
An array that lists one or more values to use in the condition. If you specify multiple values, Amazon Macie uses OR logic to join the values. Valid values for each supported property (key) are:
ACCOUNT_ID - A string that represents the unique identifier for the Amazon Web Services account that owns the bucket.
S3_BUCKET_EFFECTIVE_PERMISSION - A string that represents an enumerated value that Macie defines for the BucketPublicAccess.effectivePermission property of a bucket.
S3_BUCKET_NAME - A string that represents the name of a bucket.
S3_BUCKET_SHARED_ACCESS - A string that represents an enumerated value that Macie defines for the BucketMetadata.sharedAccess property of a bucket.
Values are case sensitive. Also, Macie doesn't support use of partial values or wildcard characters in these values.
(string) --
tagCriterion (dict) --
A tag-based condition that defines an operator and tag keys, tag values, or tag key and value pairs for including or excluding buckets from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) and NE (not equals).
tagValues (list) --
The tag keys, tag values, or tag key and value pairs to use in the condition.
(dict) --
Specifies a tag key, a tag value, or a tag key and value (as a pair) to use in a tag-based condition that determines whether an S3 bucket is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.
key (string) --
The value for the tag key to use in the condition.
value (string) --
The tag value to use in the condition.
includes (dict) --
The property- and tag-based conditions that determine which buckets to include in the job.
and (list) --
An array of conditions, one for each condition that determines which buckets to include or exclude from the job. If you specify more than one condition, Amazon Macie uses AND logic to join the conditions.
(dict) --
Specifies a property- or tag-based condition that defines criteria for including or excluding S3 buckets from a classification job.
simpleCriterion (dict) --
A property-based condition that defines a property, operator, and one or more values for including or excluding buckets from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) and NE (not equals).
key (string) --
The property to use in the condition.
values (list) --
An array that lists one or more values to use in the condition. If you specify multiple values, Amazon Macie uses OR logic to join the values. Valid values for each supported property (key) are:
ACCOUNT_ID - A string that represents the unique identifier for the Amazon Web Services account that owns the bucket.
S3_BUCKET_EFFECTIVE_PERMISSION - A string that represents an enumerated value that Macie defines for the BucketPublicAccess.effectivePermission property of a bucket.
S3_BUCKET_NAME - A string that represents the name of a bucket.
S3_BUCKET_SHARED_ACCESS - A string that represents an enumerated value that Macie defines for the BucketMetadata.sharedAccess property of a bucket.
Values are case sensitive. Also, Macie doesn't support use of partial values or wildcard characters in these values.
(string) --
tagCriterion (dict) --
A tag-based condition that defines an operator and tag keys, tag values, or tag key and value pairs for including or excluding buckets from the job.
comparator (string) --
The operator to use in the condition. Valid values are EQ (equals) and NE (not equals).
tagValues (list) --
The tag keys, tag values, or tag key and value pairs to use in the condition.
(dict) --
Specifies a tag key, a tag value, or a tag key and value (as a pair) to use in a tag-based condition that determines whether an S3 bucket is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.
key (string) --
The value for the tag key to use in the condition.
value (string) --
The tag value to use in the condition.
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. This value is null if the job is configured to run only once.
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 doesn't run the job that month. Macie runs the job only during months that have the specified day. For example, if this value is 31 and a month has only 30 days, Macie doesn't run the job that month. To run the job every month, specify a value that's less than 29.
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 or job run 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 or job run will expire and be cancelled if you don't resume it first.
jobImminentExpirationHealthEventArn (string) --
The Amazon Resource Name (ARN) of the Health event that Amazon Macie sent to notify you of the job or job run'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.