{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-interactive-video-service/json-schema/amazon-interactive-video-service-get-stream-session-response-schema.json",
  "title": "GetStreamSessionResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-interactive-video-service-getstreamsession-api-openapi.yml#/components/schemas/GetStreamSessionResponse",
  "type": "object",
  "properties": {
    "streamSession": {
      "$ref": "#/$defs/StreamSession"
    }
  },
  "$defs": {
    "AudioConfiguration": {
      "type": "object",
      "properties": {
        "codec": {
          "type": "string",
          "description": "Codec used for the audio encoding."
        },
        "targetBitrate": {
          "type": "integer",
          "description": "The expected ingest bitrate (bits per second). This is configured in the encoder."
        },
        "sampleRate": {
          "type": "integer",
          "description": "Number of audio samples recorded per second."
        },
        "channels": {
          "type": "integer",
          "description": "Number of audio channels."
        },
        "track": {
          "type": "string",
          "description": "Name of the audio track (if the stream has an audio track). If multitrack is not enabled, this is Track0 (the sole track)."
        }
      }
    },
    "Channel": {
      "type": "object",
      "properties": {
        "arn": {
          "type": "string",
          "description": "Channel ARN."
        },
        "name": {
          "type": "string",
          "description": "Channel name."
        },
        "latencyMode": {
          "type": "string",
          "description": "Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. Default: LOW."
        },
        "type": {
          "type": "string",
          "enum": [
            "BASIC",
            "STANDARD",
            "ADVANCED_SD",
            "ADVANCED_HD"
          ],
          "description": "Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable input resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD. For details, see Channel Types."
        },
        "recordingConfigurationArn": {
          "type": "string",
          "description": "Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. Default: \"\" (empty string, recording is disabled)."
        },
        "ingestEndpoint": {
          "type": "string",
          "description": "Channel ingest endpoint, part of the definition of an ingest server, used when you set up streaming software."
        },
        "playbackUrl": {
          "type": "string",
          "description": "Channel playback URL."
        },
        "authorized": {
          "type": "boolean",
          "description": "Whether the channel is private (enabled for playback authorization). Default: false."
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Tags attached to the resource. Array of 1-50 maps, each of the form string:string (key:value). See Best practices and strategies in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and \"Tag naming limits and requirements\"; Amazon IVS has no service-specific constraints beyond what is documented there."
        },
        "insecureIngest": {
          "type": "boolean",
          "description": "Whether the channel allows insecure RTMP ingest. Default: false."
        },
        "preset": {
          "type": "string",
          "enum": [
            "HIGHER_BANDWIDTH_DELIVERY",
            "CONSTRAINED_BANDWIDTH_DELIVERY"
          ],
          "description": "Optional transcode preset for the channel. This is selectable only for ADVANCED_HD and ADVANCED_SD channel types. For those channel types, the default preset is HIGHER_BANDWIDTH_DELIVERY. For other channel types (BASIC and STANDARD), preset is the empty string (\"\")."
        },
        "srt": {
          "$ref": "#/$defs/Srt"
        },
        "playbackRestrictionPolicyArn": {
          "type": "string",
          "description": "Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction. Default: \"\" (empty string, no playback restriction policy is applied)."
        },
        "multitrackInputConfiguration": {
          "$ref": "#/$defs/MultitrackInputConfiguration"
        },
        "containerFormat": {
          "type": "string",
          "description": "Indicates which content-packaging format is used (MPEG-TS or fMP4). If multitrackInputConfiguration is specified and enabled is true, then containerFormat is required and must be set to FRAGMENTED_MP4. Otherwise, containerFormat may be set to TS or FRAGMENTED_MP4. Default: TS."
        },
        "adConfigurationArn": {
          "type": "string",
          "description": "ARN of the ad configuration associated with the channel."
        },
        "failoverSlateConfigurationArn": {
          "type": "string",
          "description": "Failover-slate-configuration ARN. A valid ARN value here both specifies the ARN and enables failover slate. Default: \"\" (empty string, no failover slate configuration is applied)."
        }
      }
    },
    "DestinationConfiguration": {
      "type": "object",
      "properties": {
        "s3": {
          "$ref": "#/$defs/S3DestinationConfiguration"
        }
      }
    },
    "FailoverSlateConfiguration": {
      "type": "object",
      "properties": {
        "arn": {
          "type": "string",
          "description": "Failover-slate-configuration ARN."
        },
        "name": {
          "type": "string",
          "description": "Failover-slate-configuration name."
        },
        "activationThresholdSeconds": {
          "type": "integer",
          "description": "Number of seconds of ingest interruption before the failover slate activates. Default: 3."
        },
        "minSlateDisplaySeconds": {
          "type": "integer",
          "description": "Minimum number of seconds that the failover slate displays after activation. Default: 3."
        },
        "maxSlateDisplaySeconds": {
          "type": "integer",
          "description": "Maximum number of seconds that the failover slate displays. Default: 60."
        },
        "state": {
          "type": "string",
          "description": "Current state of the failover slate configuration."
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Tags attached to the resource. Array of 1-50 maps, each of the form string:string (key:value). See Best practices and strategies in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and \"Tag naming limits and requirements\"; Amazon IVS has no service-specific constraints beyond what is documented there."
        }
      },
      "required": [
        "arn",
        "state"
      ]
    },
    "IngestConfiguration": {
      "type": "object",
      "properties": {
        "video": {
          "$ref": "#/$defs/VideoConfiguration"
        },
        "audio": {
          "$ref": "#/$defs/AudioConfiguration"
        }
      }
    },
    "IngestConfigurations": {
      "type": "object",
      "properties": {
        "videoConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VideoConfiguration"
          },
          "description": "Encoder settings for video"
        },
        "audioConfigurations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AudioConfiguration"
          },
          "description": "Encoder settings for audio."
        }
      },
      "required": [
        "videoConfigurations",
        "audioConfigurations"
      ]
    },
    "MultitrackInputConfiguration": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Indicates whether multitrack input is enabled. Can be set to true only if channel type is STANDARD. Setting enabled to true with any other channel type will cause an exception. If true, then policy, maximumResolution, and containerFormat are required, and containerFormat must be set to FRAGMENTED_MP4. Default: false."
        },
        "policy": {
          "type": "string",
          "enum": [
            "ALLOW",
            "REQUIRE"
          ],
          "description": "Indicates whether multitrack input is allowed or required. Required if enabled is true."
        },
        "maximumResolution": {
          "type": "string",
          "enum": [
            "SD",
            "HD",
            "FULL_HD"
          ],
          "description": "Maximum resolution for multitrack input. Required if enabled is true."
        }
      }
    },
    "RecordingConfiguration": {
      "type": "object",
      "properties": {
        "arn": {
          "type": "string",
          "description": "Recording-configuration ARN."
        },
        "name": {
          "type": "string",
          "description": "Recording-configuration name. The value does not need to be unique."
        },
        "destinationConfiguration": {
          "$ref": "#/$defs/DestinationConfiguration"
        },
        "state": {
          "type": "string",
          "description": "Indicates the current state of the recording configuration. When the state is ACTIVE, the configuration is ready for recording a channel stream."
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Tags attached to the resource. Array of 1-50 maps, each of the form string:string (key:value). See Best practices and strategies in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and \"Tag naming limits and requirements\"; Amazon IVS has no service-specific constraints beyond what is documented there."
        },
        "thumbnailConfiguration": {
          "$ref": "#/$defs/ThumbnailConfiguration"
        },
        "recordingReconnectWindowSeconds": {
          "type": "integer",
          "description": "If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together. Default: 0."
        },
        "renditionConfiguration": {
          "$ref": "#/$defs/RenditionConfiguration"
        }
      },
      "required": [
        "arn",
        "destinationConfiguration",
        "state"
      ]
    },
    "RenditionConfiguration": {
      "type": "object",
      "properties": {
        "renditionSelection": {
          "type": "string",
          "description": "Indicates which set of renditions are recorded for a stream. For BASIC channels, the CUSTOM value has no effect. If CUSTOM is specified, a set of renditions must be specified in the renditions field. Default: ALL."
        },
        "renditions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "SD",
              "HD",
              "FULL_HD",
              "LOWEST_RESOLUTION"
            ]
          },
          "description": "Indicates which renditions are recorded for a stream, if renditionSelection is CUSTOM; otherwise, this field is irrelevant. The selected renditions are recorded if they are available during the stream. If a selected rendition is unavailable, the best available rendition is recorded. For details on the resolution dimensions of each rendition, see Auto-Record to Amazon S3."
        }
      }
    },
    "S3DestinationConfiguration": {
      "type": "object",
      "properties": {
        "bucketName": {
          "type": "string",
          "description": "Location (S3 bucket name) where recorded videos will be stored."
        }
      },
      "required": [
        "bucketName"
      ]
    },
    "Srt": {
      "type": "object",
      "properties": {
        "endpoint": {
          "type": "string",
          "description": "The endpoint to be used when streaming with IVS using the SRT protocol."
        },
        "passphrase": {
          "type": "string",
          "description": "Auto-generated passphrase to enable encryption. This field is applicable only if the end user has not enabled the insecureIngest option for the channel."
        }
      }
    },
    "StreamEvent": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name that identifies the stream event within a type."
        },
        "type": {
          "type": "string",
          "description": "Logical group for certain events."
        },
        "eventTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time when the event occurred. This is an ISO 8601 timestamp; note that this is returned as a string."
        },
        "code": {
          "type": "string",
          "description": "Provides additional details about the stream event. There are several values; the long descriptions are provided in the IVS console but not delivered through the IVS API or EventBridge. Multitrack-related codes are used only for certain Session Ended events. MultitrackInputNotAllowed — The broadcast client attempted to connect with multitrack input, but multitrack input was not enabled on the channel. Check your broadcast software settings or set MultitrackInputConfiguration.Policy to ALLOW or REQUIRE. MultitrackInputRequired — The broadcast client attempted to connect with single-track video,"
        }
      }
    },
    "StreamSession": {
      "type": "object",
      "properties": {
        "streamId": {
          "type": "string",
          "description": "Unique identifier for a live or previously live stream in the specified channel."
        },
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time when the channel went live. This is an ISO 8601 timestamp; note that this is returned as a string."
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "Time when the channel went offline. This is an ISO 8601 timestamp; note that this is returned as a string. For live streams, this is NULL."
        },
        "channel": {
          "$ref": "#/$defs/Channel"
        },
        "ingestConfiguration": {
          "$ref": "#/$defs/IngestConfiguration"
        },
        "ingestConfigurations": {
          "$ref": "#/$defs/IngestConfigurations"
        },
        "recordingConfiguration": {
          "$ref": "#/$defs/RecordingConfiguration"
        },
        "truncatedEvents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StreamEvent"
          },
          "description": "List of Amazon IVS events that the stream encountered. The list is sorted by most recent events and contains up to 500 events. For Amazon IVS events, see Using Amazon EventBridge with Amazon IVS."
        },
        "failoverSlateConfiguration": {
          "$ref": "#/$defs/FailoverSlateConfiguration"
        }
      }
    },
    "ThumbnailConfiguration": {
      "type": "object",
      "properties": {
        "recordingMode": {
          "type": "string",
          "description": "Thumbnail recording mode. Default: INTERVAL."
        },
        "targetIntervalSeconds": {
          "type": "integer",
          "description": "The targeted thumbnail-generation interval in seconds. This is configurable (and required) only if recordingMode is INTERVAL. Default: 60. Important: For the BASIC channel type, or the STANDARD channel type with multitrack input, setting a value for targetIntervalSeconds does not guarantee that thumbnails are generated at the specified interval. For thumbnails to be generated at the targetIntervalSeconds interval, the IDR/Keyframe value for the input video must be less than the targetIntervalSeconds value. See Amazon IVS Streaming Configuration for information on setting IDR/Keyframe to the re"
        },
        "resolution": {
          "type": "string",
          "enum": [
            "SD",
            "HD",
            "FULL_HD",
            "LOWEST_RESOLUTION"
          ],
          "description": "Indicates the desired resolution of recorded thumbnails. Thumbnails are recorded at the selected resolution if the corresponding rendition is available during the stream; otherwise, they are recorded at source resolution. For more information about resolution values and their corresponding height and width dimensions, see Auto-Record to Amazon S3. Default: Null (source resolution is returned)."
        },
        "storage": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Indicates the format in which thumbnails are recorded. SEQUENTIAL records all generated thumbnails in a serial manner, to the media/thumbnails directory. LATEST saves the latest thumbnail in media/latest_thumbnail/thumb.jpg and overwrites it at the interval specified by targetIntervalSeconds. You can enable both SEQUENTIAL and LATEST. Default: SEQUENTIAL."
        }
      }
    },
    "VideoConfiguration": {
      "type": "object",
      "properties": {
        "avcProfile": {
          "type": "string",
          "description": "(Deprecated) Indicates to the decoder the requirements for decoding the stream. For definitions of the valid values, see the H.264 specification. This is populated only when VideoConfiguration is part of the deprecated IngestConfiguration; otherwise, this is an empty string."
        },
        "avcLevel": {
          "type": "string",
          "description": "(Deprecated) Indicates the degree of required decoder performance for a profile. Normally this is set automatically by the encoder. For details, see the H.264 specification. This is populated only when VideoConfiguration is part of the deprecated IngestConfiguration; otherwise, this is an empty string."
        },
        "codec": {
          "type": "string",
          "description": "Codec used for the video encoding."
        },
        "encoder": {
          "type": "string",
          "description": "Software or hardware used to encode the video."
        },
        "targetBitrate": {
          "type": "integer",
          "description": "The expected ingest bitrate (bits per second). This is configured in the encoder."
        },
        "targetFramerate": {
          "type": "integer",
          "description": "The expected ingest framerate. This is configured in the encoder."
        },
        "videoHeight": {
          "type": "integer",
          "description": "Video-resolution height in pixels."
        },
        "videoWidth": {
          "type": "integer",
          "description": "Video-resolution width in pixels."
        },
        "level": {
          "type": "string",
          "description": "Indicates the degree of required decoder performance for a profile. Normally this is set automatically by the encoder. When an AVC codec is used, this field has the same value as avcLevel."
        },
        "track": {
          "type": "string",
          "description": "Name of the video track. If multitrack is not enabled, this is Track0 (the sole track)."
        },
        "profile": {
          "type": "string",
          "description": "Indicates to the decoder the requirements for decoding the stream. When an AVC codec is used, this field has the same value as avcProfile."
        }
      }
    }
  }
}