Classification Job Creation - Amazon Macie

Classification Job Creation

The Classification Job Creation resource represents the collection of settings that define the scope, nature, and schedule for a classification job. A classification job is a job that analyzes data in specific Amazon S3 buckets by using managed data identifiers that Amazon Macie provides and, optionally, custom data identifiers that you design.

When you create a classification job, you can configure it to address specific scenarios. For example, you can use property- or tag-based conditions to perform targeted analysis of data sources that meet specific criteria. You can also specify the sampling depth that you want to apply to the analysis. You might also define a schedule for running the job on a recurring basis, such as every day or on a given day of each week or month. This can be helpful if you want to align the analysis of a data source with periodic updates to that data source.

You can use the Classification Job Creation resource to create and define the settings for a new classification job.

URI

/jobs

HTTP Methods

POST

Operation ID: CreateClassificationJob

Creates and defines the settings for a classification job.

Responses
Status Code Response Model Description
200 CreateClassificationJobResponse

The request succeeded. The specified job was created.

400 ValidationException

The request failed because it contains a syntax error.

402 ServiceQuotaExceededException

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

403 AccessDeniedException

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

404 ResourceNotFoundException

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

409 ConflictException

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

429 ThrottlingException

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

500 InternalServerException

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

Schemas

Request Bodies

Example POST

{ "customDataIdentifierIds": [ "string" ], "scheduleFrequency": { "dailySchedule": { }, "weeklySchedule": { }, "monthlySchedule": { } }, "samplingPercentage": integer, "clientToken": "string", "name": "string", "description": "string", "initialRun": boolean, "jobType": enum, "s3JobDefinition": { "bucketDefinitions": [ { "accountId": "string", "buckets": [ "string" ] } ], "scoping": { } }, "tags": { } }

Response Bodies

Example CreateClassificationJobResponse

{ "jobId": "string", "jobArn": "string" }

Example ValidationException

{ "message": "string" }

Example ServiceQuotaExceededException

{ "message": "string" }

Example AccessDeniedException

{ "message": "string" }

Example ResourceNotFoundException

{ "message": "string" }

Example ConflictException

{ "message": "string" }

Example ThrottlingException

{ "message": "string" }

Example InternalServerException

{ "message": "string" }

Properties

AccessDeniedException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

ConflictException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

CreateClassificationJobRequest

Specifies the scope, schedule, and other settings for a classification job.

Property Type Required Description
customDataIdentifierIds

Array of type string

False

The custom data identifiers to use for data analysis and classification.

scheduleFrequency

JobScheduleFrequency

False

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 of the jobType property to ONE_TIME.

samplingPercentage

integer

Format: int32

False

The sampling depth, as a percentage, to apply when processing objects. This value determines the percentage of eligible objects that the job analyzes. If the value is less than 100, Amazon Macie randomly selects the objects to analyze, up to the specified percentage.

clientToken

string

True

A unique, case-sensitive token that you provide to ensure the idempotency of the request.

name

string

True

A custom name for the job. The name must contain at least 3 characters and can contain as many as 64 characters.

description

string

False

A custom description of the job. The description can contain as many as 512 characters.

initialRun

boolean

False

Specifies whether to run the job immediately, after it's created.

jobType

JobType

True

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.

s3JobDefinition

S3JobDefinition

True

The S3 buckets that contain the objects to analyze, and the scope of that analysis.

tags

TagMap

False

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

CreateClassificationJobResponse

Provides information about a classification job that was created in response to a request.

Property Type Required Description
jobId

string

False

The unique identifier for the job.

jobArn

string

False

The Amazon Resource Name (ARN) of the job.

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

object

False

Run the job once a day, every day. If specified, this is an empty object.

weeklySchedule

object

False

Run the job once a week, on a specific day of the week. Valid values are: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, and SUNDAY.

monthlySchedule

object

False

Run the job once a month, on a specific day of the month. This value can be an integer from 1 through 30.

JobScopeTerm

Specifies one or more conditions that determine which objects a classification job analyzes.

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 a job.

tagScopeTerm

TagScopeTerm

False

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

JobType

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

  • ONE_TIME

  • SCHEDULED

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 S3 buckets contain the objects that a classification job analyzes.

Property Type Required Description
accountId

string

False

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

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 bucket that contains objects to analyze.

scoping

object

False

A JobScopeTerm object that specifies conditions for including or excluding objects from the job.

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

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.

values

Array of type string

False

An array that lists one or more values to use in the condition.

key

ScopeFilterKey

False

The property to use in the condition.

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.

tagValues

Array of type TagValuePair

False

The 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 and value, as a 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, to use in the condition.

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.

ValidationException

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

Property Type Required Description
message

string

False

The explanation of the error that occurred.

See Also

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

CreateClassificationJob