Skip to content

Commit

Permalink
feat(client-mediatailor): Adds options for configuring how MediaTailo…
Browse files Browse the repository at this point in the history
…r conditions ads before inserting them into the content stream. Based on the new settings, MediaTailor will either transcode ads to match the content stream as it has in the past, or it will insert ads without first transcoding them.
  • Loading branch information
awstools committed Jan 30, 2025
1 parent 46d4d66 commit ebb8c7d
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface ConfigureLogsForPlaybackConfigurationCommandOutput
__MetadataBearer {}

/**
* <p>Amazon CloudWatch log settings for a playback configuration.</p>
* <p>Defines where AWS Elemental MediaTailor sends logs for the playback configuration.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export interface GetPlaybackConfigurationCommandOutput extends GetPlaybackConfig
* // },
* // TranscodeProfileName: "STRING_VALUE",
* // VideoContentSourceUrl: "STRING_VALUE",
* // AdConditioningConfiguration: { // AdConditioningConfiguration
* // StreamingMediaFileConditioning: "TRANSCODE" || "NONE", // required
* // },
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ export interface ListPlaybackConfigurationsCommandOutput extends ListPlaybackCon
* // },
* // TranscodeProfileName: "STRING_VALUE",
* // VideoContentSourceUrl: "STRING_VALUE",
* // AdConditioningConfiguration: { // AdConditioningConfiguration
* // StreamingMediaFileConditioning: "TRANSCODE" || "NONE", // required
* // },
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ export interface PutPlaybackConfigurationCommandOutput extends PutPlaybackConfig
* },
* TranscodeProfileName: "STRING_VALUE",
* VideoContentSourceUrl: "STRING_VALUE",
* AdConditioningConfiguration: { // AdConditioningConfiguration
* StreamingMediaFileConditioning: "TRANSCODE" || "NONE", // required
* },
* };
* const command = new PutPlaybackConfigurationCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -132,6 +135,9 @@ export interface PutPlaybackConfigurationCommandOutput extends PutPlaybackConfig
* // },
* // TranscodeProfileName: "STRING_VALUE",
* // VideoContentSourceUrl: "STRING_VALUE",
* // AdConditioningConfiguration: { // AdConditioningConfiguration
* // StreamingMediaFileConditioning: "TRANSCODE" || "NONE", // required
* // },
* // };
*
* ```
Expand Down
73 changes: 62 additions & 11 deletions clients/client-mediatailor/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,33 @@ export interface LiveSource {
Tags?: Record<string, string> | undefined;
}

/**
* @public
* @enum
*/
export const StreamingMediaFileConditioning = {
NONE: "NONE",
TRANSCODE: "TRANSCODE",
} as const;

/**
* @public
*/
export type StreamingMediaFileConditioning =
(typeof StreamingMediaFileConditioning)[keyof typeof StreamingMediaFileConditioning];

/**
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>
* @public
*/
export interface AdConditioningConfiguration {
/**
* <p>For ads that have media files with streaming delivery, indicates what transcoding action MediaTailor it first receives these ads from the ADS. <code>TRANSCODE</code> indicates that MediaTailor must transcode the ads. <code>NONE</code> indicates that you have already transcoded the ads outside of MediaTailor and don't need them transcoded as part of the ad insertion workflow. For more information about ad conditioning see <a href="https://docs.aws.amazon.com/precondition-ads.html">https://docs.aws.amazon.com/precondition-ads.html</a>.</p>
* @public
*/
StreamingMediaFileConditioning: StreamingMediaFileConditioning | undefined;
}

/**
* @public
* @enum
Expand Down Expand Up @@ -838,12 +865,12 @@ export interface LivePreRollConfiguration {
}

/**
* <p>Returns Amazon CloudWatch log settings for a playback configuration.</p>
* <p>Defines where AWS Elemental MediaTailor sends logs for the playback configuration.</p>
* @public
*/
export interface LogConfiguration {
/**
* <p>The percentage of session logs that MediaTailor sends to your Cloudwatch Logs account. For example, if your playback configuration has 1000 sessions and <code>percentEnabled</code> is set to <code>60</code>, MediaTailor sends logs for 600 of the sessions to CloudWatch Logs. MediaTailor decides at random which of the playback configuration sessions to send logs for. If you want to view logs for a specific session, you can use the <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/debug-log-mode.html">debug log mode</a>.</p>
* <p>The percentage of session logs that MediaTailor sends to your configured log destination. For example, if your playback configuration has 1000 sessions and <code>percentEnabled</code> is set to <code>60</code>, MediaTailor sends logs for 600 of the sessions to CloudWatch Logs. MediaTailor decides at random which of the playback configuration sessions to send logs for. If you want to view logs for a specific session, you can use the <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/debug-log-mode.html">debug log mode</a>.</p>
* <p>Valid values: <code>0</code> - <code>100</code>
* </p>
* @public
Expand Down Expand Up @@ -907,7 +934,7 @@ export interface PlaybackConfiguration {
CdnConfiguration?: CdnConfiguration | undefined;

/**
* <p>The player parameters and aliases used as dynamic variables during session initialization. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/variables-domain.html">Domain Variables</a>.</p>
* <p>The player parameters and aliases used as dynamic variables during session initialization. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/variables-domains.html">Domain Variables</a>.</p>
* @public
*/
ConfigurationAliases?: Record<string, Record<string, string>> | undefined;
Expand Down Expand Up @@ -937,7 +964,7 @@ export interface PlaybackConfiguration {
LivePreRollConfiguration?: LivePreRollConfiguration | undefined;

/**
* <p>The Amazon CloudWatch log settings for a playback configuration.</p>
* <p>Defines where AWS Elemental MediaTailor sends logs for the playback configuration.</p>
* @public
*/
LogConfiguration?: LogConfiguration | undefined;
Expand Down Expand Up @@ -1001,6 +1028,12 @@ export interface PlaybackConfiguration {
* @public
*/
VideoContentSourceUrl?: string | undefined;

/**
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>
* @public
*/
AdConditioningConfiguration?: AdConditioningConfiguration | undefined;
}

/**
Expand All @@ -1021,7 +1054,7 @@ export interface PrefetchConsumption {
EndTime: Date | undefined;

/**
* <p>The time when prefetched ads are considered for use in an ad break. If you don't specify <code>StartTime</code>, the prefetched ads are available after MediaTailor retrives them from the ad decision server.</p>
* <p>The time when prefetched ads are considered for use in an ad break. If you don't specify <code>StartTime</code>, the prefetched ads are available after MediaTailor retrieves them from the ad decision server.</p>
* @public
*/
StartTime?: Date | undefined;
Expand Down Expand Up @@ -2624,7 +2657,7 @@ export interface UpdateChannelResponse {
*/
export interface ConfigureLogsForPlaybackConfigurationRequest {
/**
* <p>The percentage of session logs that MediaTailor sends to your Cloudwatch Logs account. For example, if your playback configuration has 1000 sessions and percentEnabled is set to <code>60</code>, MediaTailor sends logs for 600 of the sessions to CloudWatch Logs. MediaTailor decides at random which of the playback configuration sessions to send logs for. If you want to view logs for a specific session, you can use the <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/debug-log-mode.html">debug log mode</a>.</p>
* <p>The percentage of session logs that MediaTailor sends to your CloudWatch Logs account. For example, if your playback configuration has 1000 sessions and percentEnabled is set to <code>60</code>, MediaTailor sends logs for 600 of the sessions to CloudWatch Logs. MediaTailor decides at random which of the playback configuration sessions to send logs for. If you want to view logs for a specific session, you can use the <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/debug-log-mode.html">debug log mode</a>.</p>
* <p>Valid values: <code>0</code> - <code>100</code>
* </p>
* @public
Expand Down Expand Up @@ -3343,7 +3376,7 @@ export interface GetPlaybackConfigurationResponse {
CdnConfiguration?: CdnConfiguration | undefined;

/**
* <p>The player parameters and aliases used as dynamic variables during session initialization. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/variables-domain.html">Domain Variables</a>.</p>
* <p>The player parameters and aliases used as dynamic variables during session initialization. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/variables-domains.html">Domain Variables</a>.</p>
* @public
*/
ConfigurationAliases?: Record<string, Record<string, string>> | undefined;
Expand Down Expand Up @@ -3373,7 +3406,7 @@ export interface GetPlaybackConfigurationResponse {
LivePreRollConfiguration?: LivePreRollConfiguration | undefined;

/**
* <p>The Amazon CloudWatch log settings for a playback configuration.</p>
* <p>The configuration that defines where AWS Elemental MediaTailor sends logs for the playback configuration.</p>
* @public
*/
LogConfiguration?: LogConfiguration | undefined;
Expand Down Expand Up @@ -3437,6 +3470,12 @@ export interface GetPlaybackConfigurationResponse {
* @public
*/
VideoContentSourceUrl?: string | undefined;

/**
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns. </p>
* @public
*/
AdConditioningConfiguration?: AdConditioningConfiguration | undefined;
}

/**
Expand Down Expand Up @@ -3855,7 +3894,7 @@ export interface PutPlaybackConfigurationRequest {
CdnConfiguration?: CdnConfiguration | undefined;

/**
* <p>The player parameters and aliases used as dynamic variables during session initialization. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/variables-domain.html">Domain Variables</a>.</p>
* <p>The player parameters and aliases used as dynamic variables during session initialization. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/variables-domains.html">Domain Variables</a>.</p>
* @public
*/
ConfigurationAliases?: Record<string, Record<string, string>> | undefined;
Expand Down Expand Up @@ -3919,6 +3958,12 @@ export interface PutPlaybackConfigurationRequest {
* @public
*/
VideoContentSourceUrl?: string | undefined;

/**
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>
* @public
*/
AdConditioningConfiguration?: AdConditioningConfiguration | undefined;
}

/**
Expand Down Expand Up @@ -3950,7 +3995,7 @@ export interface PutPlaybackConfigurationResponse {
CdnConfiguration?: CdnConfiguration | undefined;

/**
* <p>The player parameters and aliases used as dynamic variables during session initialization. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/variables-domain.html">Domain Variables</a>.</p>
* <p>The player parameters and aliases used as dynamic variables during session initialization. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/variables-domains.html">Domain Variables</a>.</p>
* @public
*/
ConfigurationAliases?: Record<string, Record<string, string>> | undefined;
Expand Down Expand Up @@ -3980,7 +4025,7 @@ export interface PutPlaybackConfigurationResponse {
LivePreRollConfiguration?: LivePreRollConfiguration | undefined;

/**
* <p>The Amazon CloudWatch log settings for a playback configuration.</p>
* <p>The configuration that defines where AWS Elemental MediaTailor sends logs for the playback configuration.</p>
* @public
*/
LogConfiguration?: LogConfiguration | undefined;
Expand Down Expand Up @@ -4044,6 +4089,12 @@ export interface PutPlaybackConfigurationResponse {
* @public
*/
VideoContentSourceUrl?: string | undefined;

/**
* <p>The setting that indicates what conditioning MediaTailor will perform on ads that the ad decision server (ADS) returns.</p>
* @public
*/
AdConditioningConfiguration?: AdConditioningConfiguration | undefined;
}

/**
Expand Down
9 changes: 9 additions & 0 deletions clients/client-mediatailor/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ import { MediaTailorServiceException as __BaseException } from "../models/MediaT
import {
AccessConfiguration,
AdBreak,
AdConditioningConfiguration,
AdMarkerPassthrough,
AdMarkupType,
Alert,
Expand Down Expand Up @@ -858,6 +859,7 @@ export const se_PutPlaybackConfigurationCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
AdConditioningConfiguration: (_) => _json(_),
AdDecisionServerUrl: [],
AvailSuppression: (_) => _json(_),
Bumper: (_) => _json(_),
Expand Down Expand Up @@ -1639,6 +1641,7 @@ export const de_GetPlaybackConfigurationCommand = async (
});
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const doc = take(data, {
AdConditioningConfiguration: _json,
AdDecisionServerUrl: __expectString,
AvailSuppression: _json,
Bumper: _json,
Expand Down Expand Up @@ -1897,6 +1900,7 @@ export const de_PutPlaybackConfigurationCommand = async (
});
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const doc = take(data, {
AdConditioningConfiguration: _json,
AdDecisionServerUrl: __expectString,
AvailSuppression: _json,
Bumper: _json,
Expand Down Expand Up @@ -2196,6 +2200,8 @@ const de_BadRequestExceptionRes = async (parsedOutput: any, context: __SerdeCont

// se_AdBreakMetadataList omitted.

// se_AdConditioningConfiguration omitted.

// se_AdMarkerPassthrough omitted.

// se_adMarkupTypes omitted.
Expand Down Expand Up @@ -2422,6 +2428,8 @@ const de___listOfVodSource = (output: any, context: __SerdeContext): VodSource[]

// de_AdBreakOpportunity omitted.

// de_AdConditioningConfiguration omitted.

// de_AdMarkerPassthrough omitted.

// de_adMarkupTypes omitted.
Expand Down Expand Up @@ -2526,6 +2534,7 @@ const de_LiveSource = (output: any, context: __SerdeContext): LiveSource => {
*/
const de_PlaybackConfiguration = (output: any, context: __SerdeContext): PlaybackConfiguration => {
return take(output, {
AdConditioningConfiguration: _json,
AdDecisionServerUrl: __expectString,
AvailSuppression: _json,
Bumper: _json,
Expand Down
Loading

0 comments on commit ebb8c7d

Please sign in to comment.