{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-connect/json-schema/amazon-connect-get-stream-for-segments-response-schema.json",
  "title": "GetStreamForSegmentsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-connect-segment-streams-api-openapi.yml#/components/schemas/GetStreamForSegmentsResponse",
  "type": "object",
  "properties": {
    "AssociatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp of when the stream was associated."
    },
    "AssociatedSegments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AssociatedSegment"
      },
      "description": "A list of segments currently associated with the stream and their subscription status."
    },
    "DomainName": {
      "type": "string",
      "description": "The unique name of the domain."
    },
    "DestinationArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the Amazon Kinesis data stream receiving segment membership events."
    },
    "DestinationRoleArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the IAM role used for Amazon Kinesis and AWS Key Management Service (KMS) operations."
    },
    "State": {
      "type": "string",
      "enum": [
        "RUNNING",
        "UNHEALTHY",
        "STOPPED"
      ],
      "description": "The operational state of the destination stream. The following are valid values: RUNNING: The stream is associated and healthy. Segment membership events are being published. UNHEALTHY: The stream is associated but events cannot currently be published. See FailureReason for details. STOPPED: The stream is no longer publishing segment membership events."
    },
    "DisassociatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp of when the stream was disassociated."
    },
    "FailureReason": {
      "type": "string",
      "description": "The reason why the stream is in an unhealthy state, if applicable."
    }
  },
  "$defs": {
    "AssociatedSegment": {
      "type": "object",
      "properties": {
        "SegmentName": {
          "type": "string",
          "description": "The unique name of the segment definition."
        },
        "Status": {
          "type": "string",
          "enum": [
            "STARTING",
            "RUNNING",
            "STOPPED",
            "FAILED"
          ],
          "description": "The subscription status of the segment. The following are valid values: STARTING: The segment is being prepared to publish membership events. RUNNING: The segment is actively publishing membership events to the stream. STOPPED: The segment has stopped publishing membership events. FAILED: The segment failed to publish membership events."
        },
        "Message": {
          "type": "string",
          "description": "An optional message providing context, such as a failure reason."
        }
      }
    }
  }
}