[ aws . macie2 ]

create-classification-job

Description

Creates and defines the settings for a classification job.

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  create-classification-job
[--client-token <value>]
[--custom-data-identifier-ids <value>]
[--description <value>]
[--initial-run | --no-initial-run]
--job-type <value>
--name <value>
--s3-job-definition <value>
[--sampling-percentage <value>]
[--schedule-frequency <value>]
[--tags <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--client-token (string)

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

--custom-data-identifier-ids (list)

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

(string)

Syntax:

"string" "string" ...

--description (string)

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

--initial-run | --no-initial-run (boolean)

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

--job-type (string)

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.

Possible values:

  • ONE_TIME

  • SCHEDULED

--name (string)

A custom name for the job. The name can contain as many as 500 characters.

--s3-job-definition (structure)

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

bucketDefinitions -> (list)

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.

(structure)

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

accountId -> (string)

The unique identifier for the AWS account that owns the buckets.

buckets -> (list)

An array that lists the names of the buckets.

(string)

scoping -> (structure)

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

excludes -> (structure)

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.

(structure)

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

simpleScopeTerm -> (structure)

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_KEY - STARTS_WITH

  • 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 or OBJECT_KEY, 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: 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.

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

Macie doesn’t support use of wildcard characters in values. Also, string values are case sensitive.

(string)

tagScopeTerm -> (structure)

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.

(structure)

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 -> (structure)

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.

(structure)

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

simpleScopeTerm -> (structure)

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_KEY - STARTS_WITH

  • 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 or OBJECT_KEY, 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: 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.

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

Macie doesn’t support use of wildcard characters in values. Also, string values are case sensitive.

(string)

tagScopeTerm -> (structure)

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.

(structure)

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.

JSON Syntax:

{
  "bucketDefinitions": [
    {
      "accountId": "string",
      "buckets": ["string", ...]
    }
    ...
  ],
  "scoping": {
    "excludes": {
      "and": [
        {
          "simpleScopeTerm": {
            "comparator": "EQ"|"GT"|"GTE"|"LT"|"LTE"|"NE"|"CONTAINS"|"STARTS_WITH",
            "key": "BUCKET_CREATION_DATE"|"OBJECT_EXTENSION"|"OBJECT_LAST_MODIFIED_DATE"|"OBJECT_SIZE"|"TAG"|"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": "BUCKET_CREATION_DATE"|"OBJECT_EXTENSION"|"OBJECT_LAST_MODIFIED_DATE"|"OBJECT_SIZE"|"TAG"|"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"
          }
        }
        ...
      ]
    }
  }
}

--sampling-percentage (integer)

The sampling depth, as a percentage, 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.

--schedule-frequency (structure)

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 -> (structure)

Specifies a daily recurrence pattern for running the job.

monthlySchedule -> (structure)

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 -> (structure)

Specifies a weekly recurrence pattern for running the job.

dayOfWeek -> (string)

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

Shorthand Syntax:

dailySchedule={},monthlySchedule={dayOfMonth=integer},weeklySchedule={dayOfWeek=string}

JSON Syntax:

{
  "dailySchedule": {

  },
  "monthlySchedule": {
    "dayOfMonth": integer
  },
  "weeklySchedule": {
    "dayOfWeek": "SUNDAY"|"MONDAY"|"TUESDAY"|"WEDNESDAY"|"THURSDAY"|"FRIDAY"|"SATURDAY"
  }
}

--tags (map)

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.

key -> (string)

value -> (string)

Shorthand Syntax:

KeyName1=string,KeyName2=string

JSON Syntax:

{"string": "string"
  ...}

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Output

jobArn -> (string)

The Amazon Resource Name (ARN) of the job.

jobId -> (string)

The unique identifier for the job.