{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-create-dataset-request-schema.json",
  "title": "CreateDatasetRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-datasets-api-openapi.yml#/components/schemas/CreateDatasetRequest",
  "type": "object",
  "properties": {
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency."
    },
    "datasetName": {
      "type": "string",
      "description": "Human-readable name for the dataset. Must be unique within the account. Immutable after creation."
    },
    "description": {
      "type": "string",
      "description": "A description of the dataset."
    },
    "source": {
      "$ref": "#/$defs/DataSourceType"
    },
    "schemaType": {
      "type": "string",
      "enum": [
        "AGENTCORE_EVALUATION_PREDEFINED_V1",
        "AGENTCORE_EVALUATION_SIMULATED_V1",
        "THIRD_PARTY_EVALUATION_V1"
      ],
      "description": "Versioned schema type governing the structure of examples. Immutable after creation."
    },
    "kmsKeyArn": {
      "type": "string",
      "description": "Optional KMS key ARN for server-side encryption on service Amazon S3 writes."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of tag keys and values to assign to the dataset."
    }
  },
  "required": [
    "datasetName",
    "source",
    "schemaType"
  ],
  "$defs": {
    "DataSourceType": {
      "type": "object",
      "properties": {
        "inlineExamples": {
          "$ref": "#/$defs/InlineExamplesSource"
        },
        "s3Source": {
          "$ref": "#/$defs/S3Source"
        }
      },
      "description": "Exactly one member is set."
    },
    "InlineExamplesSource": {
      "type": "object",
      "properties": {},
      "required": [
        "examples"
      ]
    },
    "S3Source": {
      "type": "object",
      "properties": {
        "s3Uri": {
          "type": "string",
          "description": "Amazon S3 URI of the JSONL file (for example, s3://my-bucket/path/to/examples.jsonl)."
        }
      },
      "required": [
        "s3Uri"
      ]
    }
  }
}