{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-aurora-dsql/json-schema/amazon-aurora-dsql-get-stream-output-schema.json",
  "title": "GetStreamOutput",
  "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/GetStreamOutput",
  "type": "object",
  "properties": {
    "clusterIdentifier": {
      "type": "string",
      "description": "The ID of the cluster for the retrieved stream."
    },
    "streamIdentifier": {
      "type": "string",
      "description": "The ID of the retrieved stream."
    },
    "arn": {
      "type": "string",
      "description": "The ARN of the retrieved stream."
    },
    "status": {
      "type": "string",
      "enum": [
        "CREATING",
        "ACTIVE",
        "DELETING",
        "DELETED",
        "FAILED",
        "IMPAIRED"
      ],
      "description": "The current status of the retrieved stream."
    },
    "creationTime": {
      "type": "string",
      "format": "date-time",
      "description": "The time when the stream was created."
    },
    "ordering": {
      "type": "string",
      "enum": [
        "UNORDERED"
      ],
      "description": "The ordering mode of the stream."
    },
    "format": {
      "type": "string",
      "enum": [
        "JSON"
      ],
      "description": "The format of the stream records."
    },
    "targetDefinition": {
      "$ref": "#/$defs/TargetDefinition"
    },
    "statusReason": {
      "$ref": "#/$defs/StatusReason"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of tags associated with the stream."
    }
  },
  "required": [
    "clusterIdentifier",
    "streamIdentifier",
    "arn",
    "status",
    "creationTime",
    "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"
      ]
    },
    "StatusReason": {
      "type": "object",
      "properties": {
        "error": {
          "type": "string",
          "enum": [
            "KINESIS_THROUGHPUT_EXCEEDED",
            "KINESIS_STREAM_NOT_FOUND",
            "ROLE_ACCESS_DENIED",
            "KINESIS_ACCESS_DENIED",
            "KINESIS_KMS_ACCESS_DENIED",
            "KINESIS_OVERSIZE_RECORD",
            "CLUSTER_CMK_INACCESSIBLE",
            "INTERNAL_ERROR"
          ],
          "description": "The error code for the stream failure."
        },
        "updatedAt": {
          "type": "string",
          "description": "The timestamp when the status was updated."
        }
      },
      "required": [
        "error",
        "updatedAt"
      ]
    },
    "TargetDefinition": {
      "type": "object",
      "properties": {
        "kinesis": {
          "$ref": "#/$defs/KinesisTargetDefinition"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}