{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-aurora-dsql/json-schema/amazon-aurora-dsql-create-stream-input-schema.json",
  "title": "CreateStreamInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-aurora-dsql-stream-api-openapi.yml#/components/schemas/CreateStreamInput",
  "type": "object",
  "properties": {
    "clusterIdentifier": {
      "type": "string",
      "description": "The ID of the cluster for which to create the stream."
    },
    "targetDefinition": {
      "$ref": "#/$defs/TargetDefinition"
    },
    "ordering": {
      "type": "string",
      "enum": [
        "UNORDERED"
      ],
      "description": "The ordering mode for the stream. Determines how change events are ordered when delivered to the target."
    },
    "format": {
      "type": "string",
      "enum": [
        "JSON"
      ],
      "description": "The format of the stream records."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of key and value pairs to use to tag your stream."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect. If you don't specify a client token, the Amazon Web Services SDK automatically generates one."
    }
  },
  "required": [
    "clusterIdentifier",
    "targetDefinition",
    "ordering",
    "format"
  ],
  "$defs": {
    "KinesisTargetDefinition": {
      "type": "object",
      "properties": {
        "streamArn": {
          "type": "string",
          "description": "The ARN of the Kinesis stream."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants permission to write to the Kinesis stream. This can be a standard role (arn:aws:iam::account-id:role/role-name) or a role with a path prefix (arn:aws:iam::account-id:role/service-role/role-name), such as roles auto-created by the console."
        }
      },
      "required": [
        "streamArn",
        "roleArn"
      ]
    },
    "TargetDefinition": {
      "type": "object",
      "properties": {
        "kinesis": {
          "$ref": "#/$defs/KinesisTargetDefinition"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}