Classification Job Description - Amazon Macie

Classification Job Description

The Classification Job Description resource provides comprehensive information about the classification jobs for your account. It also provides programmatic access to the status of individual classification jobs. A classification job, also referred to as a sensitive data discovery job, is a job that analyzes objects in specific Amazon S3 buckets to determine whether the objects contain sensitive data. Each job uses managed data identifiers that Amazon Macie provides and, optionally, custom data identifiers that you create.

You can use this resource to pause, resume, or cancel a classification job, or retrieve detailed information about a classification job. To retrieve information about more than one classification job, use the Classification Job List resource.

URI

/jobs/jobId

HTTP Methods

GET

Operation ID: DescribeClassificationJob

Retrieves the status and settings for a classification job.

Path Parameters
Name Type Required Description
jobId String True

The unique identifier for the classification job.

Responses
Status Code Response Model Description
200 DescribeClassificationJobResponse

The request succeeded.

400 ValidationException

The request failed because it contains a syntax error.

402 ServiceQuotaExceededException

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

403 AccessDeniedException

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

404 ResourceNotFoundException

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

409 ConflictException

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

429 ThrottlingException

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

500 InternalServerException

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

PATCH

Operation ID: UpdateClassificationJob

Changes the status of a classification job.

Path Parameters
Name Type Required Description
jobId String True

The unique identifier for the classification job.

Responses
Status Code Response Model Description
200 Empty Schema

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).

400 ValidationException

The request failed because it contains a syntax error.

402 ServiceQuotaExceededException

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

403 AccessDeniedException

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

404 ResourceNotFoundException

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

409 ConflictException

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

429 ThrottlingException

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

500 InternalServerException

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

Schemas

Request Bodies

Example PATCH

{ "jobStatus": enum }

Response Bodies

Example DescribeClassificationJobResponse

{ "userPausedDetails": { "jobImminentExpirationHealthEventArn": "string", "jobExpiresAt": "string", "jobPausedAt": "string" }, "jobStatus": enum, "samplingPercentage": integer, "clientToken": "string", "description": "string", "jobArn": "string", "initialRun": boolean, "lastRunErrorStatus": { "code": enum }, "tags": { }, "customDataIdentifierIds": [ "string" ], "scheduleFrequency": { "dailySchedule": { }, "weeklySchedule": { "dayOfWeek": enum }, "monthlySchedule": { "dayOfMonth": integer } }, "jobId": "string", "createdAt": "string", "lastRunTime": "string", "name": "string", "jobType": enum, "s3JobDefinition": { "bucketDefinitions": [ { "accountId": "string", "buckets": [ "string" ] } ], "scoping": { "excludes": { "and": [ { "simpleScopeTerm": { "comparator": enum, "values": [ "string" ], "key": enum }, "tagScopeTerm": { "comparator": enum, "tagValues": [ { "value": "string", "key": "string" } ], "key": "string", "target": enum } } ] }, "includes": { "and": [ { "simpleScopeTerm": { "comparator": enum, "values": [ "string" ], "key": enum }, "tagScopeTerm": { "comparator": enum, "tagValues": [ { "value": "string", "key": "string" } ], "key": "string", "target": enum } } ] } } }, "statistics": { "numberOfRuns": number, "approximateNumberOfObjectsToProcess": number } }

Example Empty Schema

{ }

Example ValidationException

{ "message": "string" }

Example ServiceQuotaExceededException

{ "message": "string" }

Example AccessDeniedException

{ "message": "string" }

Example ResourceNotFoundException

{ "message": "string" }

Example ConflictException

{ "message": "string" }

Example ThrottlingException

{ "message": "string" }

Example InternalServerException

{ "message": "string" }

Properties

AccessDeniedException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

ConflictException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

DailySchedule

Specifies that a classification job runs once a day, every day. This is an empty object.

DescribeClassificationJobResponse

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

Property Type Required Description
userPausedDetails

UserPausedDetails

False

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.

jobStatus

JobStatus

False

The current status of the job. Possible values are:

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

  • 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 - Amazon 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 the job within 30 days of pausing it, the job expires and is cancelled. To check the job's expiration date, refer to the UserPausedDetails.jobExpiresAt property.

samplingPercentage

integer

Format: int32

False

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

clientToken

string

False

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

description

string

False

The custom description of the job.

jobArn

string

False

The Amazon Resource Name (ARN) of the job.

initialRun

boolean

False

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

lastRunErrorStatus

LastRunErrorStatus

False

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.

tags

TagMap

False

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

customDataIdentifierIds

Array of type string

False

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

scheduleFrequency

JobScheduleFrequency

False

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

jobId

string

False

The unique identifier for the job.

createdAt

string

Format: date-time

False

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

lastRunTime

string

Format: date-time

False

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.

name

string

False

The custom name of the job.

jobType

JobType

False

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.

s3JobDefinition

S3JobDefinition

False

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

statistics

Statistics

False

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

Empty

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

InternalServerException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

JobComparator

The operator to use in a condition. Valid values are:

  • EQ

  • GT

  • GTE

  • LT

  • LTE

  • NE

  • CONTAINS

JobScheduleFrequency

Specifies the recurrence pattern for running a classification job.

Property Type Required Description
dailySchedule

DailySchedule

False

Specifies a daily recurrence pattern for running the job.

weeklySchedule

WeeklySchedule

False

Specifies a weekly recurrence pattern for running the job.

monthlySchedule

MonthlySchedule

False

Specifies a monthly recurrence pattern for running the job.

JobScopeTerm

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

Property Type Required Description
simpleScopeTerm

SimpleScopeTerm

False

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

tagScopeTerm

TagScopeTerm

False

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.

JobScopingBlock

Specifies one or more property- and tag-based conditions that define criteria for including or excluding objects from a classification job. If you specify more than one condition, Amazon Macie uses an AND operator to join the conditions.

Property Type Required Description
and

Array of type JobScopeTerm

False

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

JobStatus

The status of a classification job. Possible values are:

  • RUNNING

  • PAUSED

  • CANCELLED

  • COMPLETE

  • IDLE

  • USER_PAUSED

JobType

The schedule for running a classification job. Valid values are:

  • ONE_TIME

  • SCHEDULED

LastRunErrorStatus

Specifies whether any account- or bucket-level access errors occurred when a classification job ran. For example, the job is configured to analyze data for a member account that was suspended, or the job is configured to analyze an S3 bucket that Amazon Macie isn't allowed to access.

Property Type Required Description
code

LastRunErrorStatusCode

False

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.

LastRunErrorStatusCode

Specifies whether any account- or bucket-level access errors occurred during the run of a one-time classification job or the most recent run of a recurring classification job. Possible values are:

  • NONE

  • ERROR

MonthlySchedule

Specifies a monthly recurrence pattern for running a classification job.

Property Type Required Description
dayOfMonth

integer

Format: int32

False

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.

ResourceNotFoundException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

S3BucketDefinitionForJob

Specifies which AWS account owns the S3 buckets that a classification job analyzes, and the buckets to analyze for the account.

Property Type Required Description
accountId

string

False

The unique identifier for the AWS account that owns the buckets. If you specify this value and don't specify a value for the buckets array, the job analyzes objects in all the buckets that are owned by the account and meet other conditions specified for the job.

buckets

Array of type string

False

An array that lists the names of the buckets.

S3JobDefinition

Specifies which S3 buckets contain the objects that a classification job analyzes, and the scope of that analysis.

Property Type Required Description
bucketDefinitions

Array of type S3BucketDefinitionForJob

False

An array of objects, one for each AWS account that owns buckets to analyze. Each object specifies the account ID for an account and one or more buckets to analyze for the account.

scoping

Scoping

False

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

ScopeFilterKey

The property to use in a condition that determines which objects are analyzed by a classification job. Valid values are:

  • BUCKET_CREATION_DATE

  • OBJECT_EXTENSION

  • OBJECT_LAST_MODIFIED_DATE

  • OBJECT_SIZE

  • TAG

Scoping

Specifies one or more property- and tag-based conditions that refine the scope of a classification job. These conditions define criteria that determine which objects a job analyzes. Exclude conditions take precedence over include conditions.

Property Type Required Description
excludes

JobScopingBlock

False

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

includes

JobScopingBlock

False

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

ServiceQuotaExceededException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

SimpleScopeTerm

Specifies a property-based condition that determines whether an object is included or excluded from a classification job.

Property Type Required Description
comparator

JobComparator

False

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)

values

Array of type string

False

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.

key

ScopeFilterKey

False

The object property to use in the condition.

Statistics

Provides processing statistics for a classification job.

Property Type Required Description
numberOfRuns

number

False

The number of times that the job has run.

approximateNumberOfObjectsToProcess

number

False

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

TagMap

A string-to-string map of key-value pairs that specifies the tags (keys and values) for a classification job, custom data identifier, findings filter, or member account.

Property Type Required Description

*

string

False

TagScopeTerm

Specifies a tag-based condition that determines whether an object is included or excluded from a classification job.

Property Type Required Description
comparator

JobComparator

False

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

tagValues

Array of type TagValuePair

False

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

key

string

False

The tag key to use in the condition.

target

TagTarget

False

The type of object to apply the condition to.

TagTarget

The type of object to apply a tag-based condition to. Valid values are:

  • S3_OBJECT

TagValuePair

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

Property Type Required Description
value

string

False

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.

key

string

False

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

ThrottlingException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

UpdateClassificationJobRequest

Changes the status of a classification job.

Property Type Required Description
jobStatus

JobStatus

True

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 and you paused the job while it was actively running, Amazon Macie immediately resumes processing from the point where you paused the job. Otherwise, Macie resumes the job according to the schedule and other configuration settings for 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's current status is RUNNING, Macie immediately begins to pause all processing tasks for the job.

    If you pause a job when its status is RUNNING and you don't resume the job within 30 days, the job expires and Macie cancels it. You can't resume a job after it's cancelled.

UserPausedDetails

Provides information about when a classification job was paused and when it will expire and be cancelled if it isn't resumed. This object is present only if a job's current status (jobStatus) is USER_PAUSED. The information in this object applies only to a job that was paused while it had a status of RUNNING.

Property Type Required Description
jobImminentExpirationHealthEventArn

string

False

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.

jobExpiresAt

string

Format: date-time

False

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.

jobPausedAt

string

Format: date-time

False

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

ValidationException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

WeeklySchedule

Specifies a weekly recurrence pattern for running a classification job.

Property Type Required Description
dayOfWeek

string

Values: SUNDAY | MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY

False

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

See Also

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

DescribeClassificationJob

UpdateClassificationJob