Skip to content

Commit

Permalink
feat(client-ivs-realtime): Adds new Stage Health EventErrorCodes appl…
Browse files Browse the repository at this point in the history
…icable to RTMP(S) broadcasts. Bug Fix: Enforces that EncoderConfiguration Video height and width must be even-number values.
  • Loading branch information
awstools committed Oct 2, 2024
1 parent 525e37e commit 5d52b43
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface ListParticipantEventsCommandOutput extends ListParticipantEvent
* // participantId: "STRING_VALUE",
* // eventTime: new Date("TIMESTAMP"),
* // remoteParticipantId: "STRING_VALUE",
* // errorCode: "INSUFFICIENT_CAPABILITIES" || "QUOTA_EXCEEDED" || "PUBLISHER_NOT_FOUND" || "BITRATE_EXCEEDED" || "RESOLUTION_EXCEEDED" || "STREAM_DURATION_EXCEEDED" || "INVALID_AUDIO_CODEC" || "INVALID_VIDEO_CODEC" || "INVALID_PROTOCOL" || "INVALID_STREAM_KEY" || "REUSE_OF_STREAM_KEY",
* // errorCode: "INSUFFICIENT_CAPABILITIES" || "QUOTA_EXCEEDED" || "PUBLISHER_NOT_FOUND" || "BITRATE_EXCEEDED" || "RESOLUTION_EXCEEDED" || "STREAM_DURATION_EXCEEDED" || "INVALID_AUDIO_CODEC" || "INVALID_VIDEO_CODEC" || "INVALID_PROTOCOL" || "INVALID_STREAM_KEY" || "REUSE_OF_STREAM_KEY" || "B_FRAME_PRESENT" || "INVALID_INPUT" || "INTERNAL_SERVER_EXCEPTION",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
108 changes: 98 additions & 10 deletions clients/client-ivs-realtime/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ export class ConflictException extends __BaseException {
*/
export interface Video {
/**
* <p>Video-resolution width. Note that the maximum value is determined by <code>width</code>
* <p>Video-resolution width. This must be an even number. Note that the maximum value is determined by <code>width</code>
* times <code>height</code>, such that the maximum total pixels is 2073600 (1920x1080 or
* 1080x1920). Default: 1280.</p>
* @public
*/
width?: number;

/**
* <p>Video-resolution height. Note that the maximum value is determined by <code>width</code>
* <p>Video-resolution height. This must be an even number. Note that the maximum value is determined by <code>width</code>
* times <code>height</code>, such that the maximum total pixels is 2073600 (1920x1080 or
* 1080x1920). Default: 720.</p>
* @public
Expand Down Expand Up @@ -2239,8 +2239,11 @@ export interface ListParticipantEventsRequest {
*/
export const EventErrorCode = {
BITRATE_EXCEEDED: "BITRATE_EXCEEDED",
B_FRAME_PRESENT: "B_FRAME_PRESENT",
INSUFFICIENT_CAPABILITIES: "INSUFFICIENT_CAPABILITIES",
INTERNAL_SERVER_EXCEPTION: "INTERNAL_SERVER_EXCEPTION",
INVALID_AUDIO_CODEC: "INVALID_AUDIO_CODEC",
INVALID_INPUT: "INVALID_INPUT",
INVALID_PROTOCOL: "INVALID_PROTOCOL",
INVALID_STREAM_KEY: "INVALID_STREAM_KEY",
INVALID_VIDEO_CODEC: "INVALID_VIDEO_CODEC",
Expand Down Expand Up @@ -2310,14 +2313,99 @@ export interface Event {

/**
* <p>If the event is an error event, the error code is provided to give insight into the
* specific error that occurred. If the event is not an error event, this field is null.
* <code>INSUFFICIENT_CAPABILITIES</code> indicates that the participant tried to take an
* action that the participant’s token is not allowed to do. For more information about
* participant capabilities, see the <code>capabilities</code> field in <a>CreateParticipantToken</a>. <code>QUOTA_EXCEEDED</code> indicates that the
* number of participants who want to publish/subscribe to a stage exceeds the quota; for more
* information, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html">Service Quotas</a>.
* <code>PUBLISHER_NOT_FOUND</code> indicates that the participant tried to subscribe to a
* publisher that doesn’t exist. </p>
* specific error that occurred. If the event is not an error event, this field is null.</p>
* <ul>
* <li>
* <p>
* <code>B_FRAME_PRESENT</code> —
* The participant's stream includes B-frames.
* For details, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-rtmp-publishing.html">
* IVS RTMP Publishing</a>.</p>
* </li>
* <li>
* <p>
* <code>BITRATE_EXCEEDED</code> —
* The participant exceeded the maximum supported bitrate.
* For details, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html">
* Service Quotas</a>.</p>
* </li>
* <li>
* <p>
* <code>INSUFFICIENT_CAPABILITIES</code> —
* The participant tried to take an action
* that the participant’s token is not allowed to do. For details on participant capabilities, see
* the <code>capabilities</code> field in <a>CreateParticipantToken</a>.</p>
* </li>
* <li>
* <p>
* <code>INTERNAL_SERVER_EXCEPTION</code> —
* The participant failed to publish to the stage due to an internal server error.</p>
* </li>
* <li>
* <p>
* <code>INVALID_AUDIO_CODEC</code> —
* The participant is using an invalid audio codec.
* For details, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html">
* Stream Ingest</a>.</p>
* </li>
* <li>
* <p>
* <code>INVALID_INPUT</code> —
* The participant is using an invalid input stream.</p>
* </li>
* <li>
* <p>
* <code>INVALID_PROTOCOL</code> —
* The participant's IngestConfiguration resource is configured for RTMPS but they tried streaming with RTMP.
* For details, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-rtmp-publishing.html">
* IVS RTMP Publishing</a>.</p>
* </li>
* <li>
* <p>
* <code>INVALID_STREAM_KEY</code> —
* The participant is using an invalid stream key.
* For details, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-rtmp-publishing.html">
* IVS RTMP Publishing</a>.</p>
* </li>
* <li>
* <p>
* <code>INVALID_VIDEO_CODEC</code> —
* The participant is using an invalid video codec.
* For details, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html">
* Stream Ingest</a>.</p>
* </li>
* <li>
* <p>
* <code>PUBLISHER_NOT_FOUND</code> —
* The participant tried to subscribe to a publisher that doesn’t exist.</p>
* </li>
* <li>
* <p>
* <code>QUOTA_EXCEEDED</code> —
* The number of participants who want to publish/subscribe to a stage exceeds the quota.
* For details, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html">
* Service Quotas</a>.</p>
* </li>
* <li>
* <p>
* <code>RESOLUTION_EXCEEDED</code> —
* The participant exceeded the maximum supported resolution.
* For details, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html">
* Service Quotas</a>.</p>
* </li>
* <li>
* <p>
* <code>REUSE_OF_STREAM_KEY</code> —
* The participant tried to use a stream key that is associated with another active stage session.</p>
* </li>
* <li>
* <p>
* <code>STREAM_DURATION_EXCEEDED</code> —
* The participant exceeded the maximum allowed stream duration.
* For details, see <a href="https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html">
* Service Quotas</a>.</p>
* </li>
* </ul>
* @public
*/
errorCode?: EventErrorCode;
Expand Down
28 changes: 23 additions & 5 deletions codegen/sdk-codegen/aws-models/ivs-realtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@
"errorCode": {
"target": "com.amazonaws.ivsrealtime#EventErrorCode",
"traits": {
"smithy.api#documentation": "<p>If the event is an error event, the error code is provided to give insight into the\n specific error that occurred. If the event is not an error event, this field is null.\n <code>INSUFFICIENT_CAPABILITIES</code> indicates that the participant tried to take an\n action that the participant’s token is not allowed to do. For more information about\n participant capabilities, see the <code>capabilities</code> field in <a>CreateParticipantToken</a>. <code>QUOTA_EXCEEDED</code> indicates that the\n number of participants who want to publish/subscribe to a stage exceeds the quota; for more\n information, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html\">Service Quotas</a>.\n <code>PUBLISHER_NOT_FOUND</code> indicates that the participant tried to subscribe to a\n publisher that doesn’t exist. </p>"
"smithy.api#documentation": "<p>If the event is an error event, the error code is provided to give insight into the\n specific error that occurred. If the event is not an error event, this field is null.</p>\n <ul>\n <li>\n <p>\n <code>B_FRAME_PRESENT</code> —\n\t\t The participant's stream includes B-frames.\n\t\t For details, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-rtmp-publishing.html\">\n\t\t IVS RTMP Publishing</a>.</p>\n </li>\n <li>\n <p>\n <code>BITRATE_EXCEEDED</code> —\n\t\t The participant exceeded the maximum supported bitrate.\n\t\t For details, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html\">\n\t\t Service Quotas</a>.</p>\n </li>\n <li>\n <p>\n <code>INSUFFICIENT_CAPABILITIES</code> —\n\t\t The participant tried to take an action\n\t\t that the participant’s token is not allowed to do. For details on participant capabilities, see\n\t\t the <code>capabilities</code> field in <a>CreateParticipantToken</a>.</p>\n </li>\n <li>\n <p>\n <code>INTERNAL_SERVER_EXCEPTION</code> —\n\t\t The participant failed to publish to the stage due to an internal server error.</p>\n </li>\n <li>\n <p>\n <code>INVALID_AUDIO_CODEC</code> —\n\t\t The participant is using an invalid audio codec.\n\t\t For details, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html\">\n\t\t Stream Ingest</a>.</p>\n </li>\n <li>\n <p>\n <code>INVALID_INPUT</code> —\n\t\t The participant is using an invalid input stream.</p>\n </li>\n <li>\n <p>\n <code>INVALID_PROTOCOL</code> —\n\t\t The participant's IngestConfiguration resource is configured for RTMPS but they tried streaming with RTMP.\n\t\t For details, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-rtmp-publishing.html\">\n\t\t IVS RTMP Publishing</a>.</p>\n </li>\n <li>\n <p>\n <code>INVALID_STREAM_KEY</code> —\n\t\t The participant is using an invalid stream key.\n\t\t For details, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-rtmp-publishing.html\">\n\t\t IVS RTMP Publishing</a>.</p>\n </li>\n <li>\n <p>\n <code>INVALID_VIDEO_CODEC</code> —\n\t\t The participant is using an invalid video codec.\n\t\t For details, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html\">\n\t\t Stream Ingest</a>.</p>\n </li>\n <li>\n <p>\n <code>PUBLISHER_NOT_FOUND</code> —\n\t\t The participant tried to subscribe to a publisher that doesn’t exist.</p>\n </li>\n <li>\n <p>\n <code>QUOTA_EXCEEDED</code> —\n\t\t The number of participants who want to publish/subscribe to a stage exceeds the quota.\n\t\t For details, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html\">\n\t\t Service Quotas</a>.</p>\n </li>\n <li>\n <p>\n <code>RESOLUTION_EXCEEDED</code> —\n\t\t The participant exceeded the maximum supported resolution.\n\t\t For details, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html\">\n\t\t Service Quotas</a>.</p>\n </li>\n <li>\n <p>\n <code>REUSE_OF_STREAM_KEY</code> —\n\t\t The participant tried to use a stream key that is associated with another active stage session.</p>\n </li>\n <li>\n <p>\n <code>STREAM_DURATION_EXCEEDED</code> —\n\t\t The participant exceeded the maximum allowed stream duration.\n\t\t For details, see <a href=\"https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html\">\n\t\t Service Quotas</a>.</p>\n </li>\n </ul>"
}
}
},
Expand Down Expand Up @@ -2266,6 +2266,24 @@
"traits": {
"smithy.api#enumValue": "REUSE_OF_STREAM_KEY"
}
},
"B_FRAME_PRESENT": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "B_FRAME_PRESENT"
}
},
"INVALID_INPUT": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "INVALID_INPUT"
}
},
"INTERNAL_SERVER_EXCEPTION": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "INTERNAL_SERVER_EXCEPTION"
}
}
}
},
Expand Down Expand Up @@ -2878,7 +2896,7 @@
"type": "integer",
"traits": {
"smithy.api#range": {
"min": 1,
"min": 2,
"max": 1920
}
}
Expand Down Expand Up @@ -5795,13 +5813,13 @@
"width": {
"target": "com.amazonaws.ivsrealtime#Width",
"traits": {
"smithy.api#documentation": "<p>Video-resolution width. Note that the maximum value is determined by <code>width</code>\n times <code>height</code>, such that the maximum total pixels is 2073600 (1920x1080 or\n 1080x1920). Default: 1280.</p>"
"smithy.api#documentation": "<p>Video-resolution width. This must be an even number. Note that the maximum value is determined by <code>width</code>\n times <code>height</code>, such that the maximum total pixels is 2073600 (1920x1080 or\n 1080x1920). Default: 1280.</p>"
}
},
"height": {
"target": "com.amazonaws.ivsrealtime#Height",
"traits": {
"smithy.api#documentation": "<p>Video-resolution height. Note that the maximum value is determined by <code>width</code>\n times <code>height</code>, such that the maximum total pixels is 2073600 (1920x1080 or\n 1080x1920). Default: 720.</p>"
"smithy.api#documentation": "<p>Video-resolution height. This must be an even number. Note that the maximum value is determined by <code>width</code>\n times <code>height</code>, such that the maximum total pixels is 2073600 (1920x1080 or\n 1080x1920). Default: 720.</p>"
}
},
"framerate": {
Expand Down Expand Up @@ -5877,7 +5895,7 @@
"type": "integer",
"traits": {
"smithy.api#range": {
"min": 1,
"min": 2,
"max": 1920
}
}
Expand Down

0 comments on commit 5d52b43

Please sign in to comment.