{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-personalize/json-schema/amazon-personalize-create-batch-segment-job-request-schema.json",
  "title": "CreateBatchSegmentJobRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-personalize-batch-segment-job-api-openapi.yml#/components/schemas/CreateBatchSegmentJobRequest",
  "type": "object",
  "properties": {
    "jobName": {
      "type": "string",
      "description": "The name of the batch segment job to create."
    },
    "solutionVersionArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the solution version you want the batch segment job to use to generate batch segments."
    },
    "filterArn": {
      "type": "string",
      "description": "The ARN of the filter to apply to the batch segment job. For more information on using filters, see Filtering batch recommendations."
    },
    "numResults": {
      "type": "integer",
      "description": "The number of predicted users generated by the batch segment job for each line of input data. The maximum number of users per segment is 5 million."
    },
    "jobInput": {
      "$ref": "#/$defs/BatchSegmentJobInput"
    },
    "jobOutput": {
      "$ref": "#/$defs/BatchSegmentJobOutput"
    },
    "roleArn": {
      "type": "string",
      "description": "The ARN of the Amazon Identity and Access Management role that has permissions to read and write to your input and output Amazon S3 buckets respectively."
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A list of tags to apply to the batch segment job."
    }
  },
  "required": [
    "jobName",
    "solutionVersionArn",
    "jobInput",
    "jobOutput",
    "roleArn"
  ],
  "$defs": {
    "BatchSegmentJobInput": {
      "type": "object",
      "properties": {
        "s3DataSource": {
          "$ref": "#/$defs/S3DataConfig"
        }
      },
      "required": [
        "s3DataSource"
      ]
    },
    "BatchSegmentJobOutput": {
      "type": "object",
      "properties": {
        "s3DataDestination": {
          "$ref": "#/$defs/S3DataConfig"
        }
      },
      "required": [
        "s3DataDestination"
      ]
    },
    "S3DataConfig": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "The file path of the Amazon S3 bucket."
        },
        "kmsKeyArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Key Management Service (KMS) key that Amazon Personalize uses to encrypt or decrypt the input and output files."
        }
      },
      "required": [
        "path"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "tagKey": {
          "type": "string",
          "description": "One part of a key-value pair that makes up a tag. A key is a general label that acts like a category for more specific tag values."
        },
        "tagValue": {
          "type": "string",
          "description": "The optional part of a key-value pair that makes up a tag. A value acts as a descriptor within a tag category (key)."
        }
      },
      "required": [
        "tagKey",
        "tagValue"
      ]
    }
  }
}