Skip to content

Commit

Permalink
feat(client-mediapackagev2): MediaPackage v2 now supports the Media Q…
Browse files Browse the repository at this point in the history
…uality Confidence Score (MQCS) published from MediaLive. Customers can control input switching based on the MQCS and publishing HTTP Headers for the MQCS via the API.
  • Loading branch information
awstools committed Nov 20, 2024
1 parent 34946f7 commit 1708e8d
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 12 deletions.
12 changes: 12 additions & 0 deletions clients/client-mediapackagev2/src/commands/CreateChannelCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export interface CreateChannelCommandOutput extends CreateChannelResponse, __Met
* ClientToken: "STRING_VALUE",
* InputType: "HLS" || "CMAF",
* Description: "STRING_VALUE",
* InputSwitchConfiguration: { // InputSwitchConfiguration
* MQCSInputSwitching: true || false,
* },
* OutputHeaderConfiguration: { // OutputHeaderConfiguration
* PublishMQCS: true || false,
* },
* Tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
Expand All @@ -65,6 +71,12 @@ export interface CreateChannelCommandOutput extends CreateChannelResponse, __Met
* // Tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // InputSwitchConfiguration: { // InputSwitchConfiguration
* // MQCSInputSwitching: true || false,
* // },
* // OutputHeaderConfiguration: { // OutputHeaderConfiguration
* // PublishMQCS: true || false,
* // },
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ export interface GetChannelCommandOutput extends GetChannelResponse, __MetadataB
* // Tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // InputSwitchConfiguration: { // InputSwitchConfiguration
* // MQCSInputSwitching: true || false,
* // },
* // OutputHeaderConfiguration: { // OutputHeaderConfiguration
* // PublishMQCS: true || false,
* // },
* // };
*
* ```
Expand Down
12 changes: 12 additions & 0 deletions clients/client-mediapackagev2/src/commands/UpdateChannelCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export interface UpdateChannelCommandOutput extends UpdateChannelResponse, __Met
* ChannelName: "STRING_VALUE", // required
* ETag: "STRING_VALUE",
* Description: "STRING_VALUE",
* InputSwitchConfiguration: { // InputSwitchConfiguration
* MQCSInputSwitching: true || false,
* },
* OutputHeaderConfiguration: { // OutputHeaderConfiguration
* PublishMQCS: true || false,
* },
* };
* const command = new UpdateChannelCommand(input);
* const response = await client.send(command);
Expand All @@ -62,6 +68,12 @@ export interface UpdateChannelCommandOutput extends UpdateChannelResponse, __Met
* // Tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // InputSwitchConfiguration: { // InputSwitchConfiguration
* // MQCSInputSwitching: true || false,
* // },
* // OutputHeaderConfiguration: { // OutputHeaderConfiguration
* // PublishMQCS: true || false,
* // },
* // };
*
* ```
Expand Down
98 changes: 90 additions & 8 deletions clients/client-mediapackagev2/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ export const ValidationExceptionType = {
NUM_MANIFESTS_LOW: "NUM_MANIFESTS_LOW",
ONLY_CMAF_INPUT_TYPE_ALLOW_FORCE_ENDPOINT_ERROR_CONFIGURATION:
"ONLY_CMAF_INPUT_TYPE_ALLOW_FORCE_ENDPOINT_ERROR_CONFIGURATION",
ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_INPUT_SWITCHING: "ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_INPUT_SWITCHING",
ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_OUTPUT_CONFIGURATION: "ONLY_CMAF_INPUT_TYPE_ALLOW_MQCS_OUTPUT_CONFIGURATION",
PERIOD_TRIGGERS_NONE_SPECIFIED_WITH_ADDITIONAL_VALUES: "PERIOD_TRIGGERS_NONE_SPECIFIED_WITH_ADDITIONAL_VALUES",
ROLE_ARN_INVALID_FORMAT: "ROLE_ARN_INVALID_FORMAT",
ROLE_ARN_LENGTH_OUT_OF_RANGE: "ROLE_ARN_LENGTH_OUT_OF_RANGE",
Expand Down Expand Up @@ -448,6 +450,18 @@ export interface PutChannelPolicyRequest {
*/
export interface PutChannelPolicyResponse {}

/**
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive.</p>
* @public
*/
export interface InputSwitchConfiguration {
/**
* <p>When true, AWS Elemental MediaPackage performs input switching based on the MQCS. Default is true. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
MQCSInputSwitching?: boolean | undefined;
}

/**
* @public
* @enum
Expand All @@ -462,6 +476,18 @@ export const InputType = {
*/
export type InputType = (typeof InputType)[keyof typeof InputType];

/**
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN.</p>
* @public
*/
export interface OutputHeaderConfiguration {
/**
* <p>When true, AWS Elemental MediaPackage includes the MQCS in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
PublishMQCS?: boolean | undefined;
}

/**
* @public
*/
Expand Down Expand Up @@ -507,6 +533,18 @@ export interface CreateChannelRequest {
*/
Description?: string | undefined;

/**
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;

/**
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;

/**
* <p>A comma-separated list of tag key:value pairs that you define. For example:</p>
* <p>
Expand Down Expand Up @@ -612,6 +650,18 @@ export interface CreateChannelResponse {
* @public
*/
Tags?: Record<string, string> | undefined;

/**
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;

/**
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;
}

/**
Expand Down Expand Up @@ -749,6 +799,18 @@ export interface GetChannelResponse {
* @public
*/
Tags?: Record<string, string> | undefined;

/**
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;

/**
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;
}

/**
Expand Down Expand Up @@ -1201,8 +1263,7 @@ export interface CreateHlsManifestConfiguration {
/**
* <p>Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,
* EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.
* ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.</p>
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.</p>
* <p>Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.</p>
* @public
*/
Expand Down Expand Up @@ -1253,8 +1314,7 @@ export interface CreateLowLatencyHlsManifestConfiguration {
/**
* <p>Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,
* EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.
* ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.</p>
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.</p>
* <p>Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.</p>
* @public
*/
Expand Down Expand Up @@ -1825,8 +1885,7 @@ export interface GetHlsManifestConfiguration {
/**
* <p>Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,
* EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.
* ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.</p>
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.</p>
* <p>Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.</p>
* @public
*/
Expand Down Expand Up @@ -1883,8 +1942,7 @@ export interface GetLowLatencyHlsManifestConfiguration {
/**
* <p>Inserts EXT-X-PROGRAM-DATE-TIME tags in the output manifest at the interval that you specify. If you don't enter an interval,
* EXT-X-PROGRAM-DATE-TIME tags aren't included in the manifest.
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.
* ID3Timed metadata messages generate every 5 seconds whenever the content is ingested.</p>
* The tags sync the stream to the wall clock so that viewers can seek to a specific time in the playback timeline on the player.</p>
* <p>Irrespective of this parameter, if any ID3Timed metadata is in the HLS input, it is passed through to the HLS output.</p>
* @public
*/
Expand Down Expand Up @@ -2671,6 +2729,18 @@ export interface UpdateChannelRequest {
* @public
*/
Description?: string | undefined;

/**
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;

/**
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;
}

/**
Expand Down Expand Up @@ -2747,6 +2817,18 @@ export interface UpdateChannelResponse {
* @public
*/
Tags?: Record<string, string> | undefined;

/**
* <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
InputSwitchConfiguration?: InputSwitchConfiguration | undefined;

/**
* <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
* @public
*/
OutputHeaderConfiguration?: OutputHeaderConfiguration | undefined;
}

/**
Expand Down
20 changes: 20 additions & 0 deletions clients/client-mediapackagev2/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ import {
HarvestedManifests,
HarvesterScheduleConfiguration,
HarvestJob,
InputSwitchConfiguration,
InternalServerException,
OriginEndpointListConfiguration,
OutputHeaderConfiguration,
ResourceNotFoundException,
S3DestinationConfig,
Scte,
Expand Down Expand Up @@ -170,7 +172,9 @@ export const se_CreateChannelCommand = async (
take(input, {
ChannelName: [],
Description: [],
InputSwitchConfiguration: (_) => _json(_),
InputType: [],
OutputHeaderConfiguration: (_) => _json(_),
tags: [, (_) => _json(_), `Tags`],
})
);
Expand Down Expand Up @@ -670,6 +674,8 @@ export const se_UpdateChannelCommand = async (
body = JSON.stringify(
take(input, {
Description: [],
InputSwitchConfiguration: (_) => _json(_),
OutputHeaderConfiguration: (_) => _json(_),
})
);
b.m("PUT").h(headers).b(body);
Expand Down Expand Up @@ -772,8 +778,10 @@ export const de_CreateChannelCommand = async (
Description: __expectString,
ETag: __expectString,
IngestEndpoints: _json,
InputSwitchConfiguration: _json,
InputType: __expectString,
ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
OutputHeaderConfiguration: _json,
Tags: _json,
});
Object.assign(contents, doc);
Expand Down Expand Up @@ -986,8 +994,10 @@ export const de_GetChannelCommand = async (
Description: __expectString,
ETag: __expectString,
IngestEndpoints: _json,
InputSwitchConfiguration: _json,
InputType: __expectString,
ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
OutputHeaderConfiguration: _json,
Tags: _json,
});
Object.assign(contents, doc);
Expand Down Expand Up @@ -1339,8 +1349,10 @@ export const de_UpdateChannelCommand = async (
Description: __expectString,
ETag: __expectString,
IngestEndpoints: _json,
InputSwitchConfiguration: _json,
InputType: __expectString,
ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
OutputHeaderConfiguration: _json,
Tags: [, _json, `tags`],
});
Object.assign(contents, doc);
Expand Down Expand Up @@ -1730,6 +1742,10 @@ const se_HarvesterScheduleConfiguration = (input: HarvesterScheduleConfiguration
});
};

// se_InputSwitchConfiguration omitted.

// se_OutputHeaderConfiguration omitted.

// se_S3DestinationConfig omitted.

// se_Scte omitted.
Expand Down Expand Up @@ -1995,6 +2011,8 @@ const de_HarvestJobsList = (output: any, context: __SerdeContext): HarvestJob[]

// de_IngestEndpointList omitted.

// de_InputSwitchConfiguration omitted.

// de_ListDashManifestConfiguration omitted.

// de_ListDashManifests omitted.
Expand Down Expand Up @@ -2039,6 +2057,8 @@ const de_OriginEndpointsList = (output: any, context: __SerdeContext): OriginEnd
return retVal;
};

// de_OutputHeaderConfiguration omitted.

// de_S3DestinationConfig omitted.

// de_Scte omitted.
Expand Down
Loading

0 comments on commit 1708e8d

Please sign in to comment.