Skip to content

Commit

Permalink
feat(client-mediatailor): This release adds support for AFTER_LIVE_ED…
Browse files Browse the repository at this point in the history
…GE mode configuration for avail suppression, and adding a fill-policy setting that sets the avail suppression to PARTIAL_AVAIL or FULL_AVAIL_ONLY when AFTER_LIVE_EDGE is enabled.
  • Loading branch information
awstools committed May 5, 2023
1 parent 75d4246 commit 03ea04c
Show file tree
Hide file tree
Showing 7 changed files with 393 additions and 250 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ export interface GetPlaybackConfigurationCommandOutput extends GetPlaybackConfig
* // { // GetPlaybackConfigurationResponse
* // AdDecisionServerUrl: "STRING_VALUE",
* // AvailSuppression: { // AvailSuppression
* // Mode: "OFF" || "BEHIND_LIVE_EDGE",
* // Mode: "OFF" || "BEHIND_LIVE_EDGE" || "AFTER_LIVE_EDGE",
* // Value: "STRING_VALUE",
* // FillPolicy: "FULL_AVAIL_ONLY" || "PARTIAL_AVAIL",
* // },
* // Bumper: { // Bumper
* // EndUrl: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ export interface ListPlaybackConfigurationsCommandOutput extends ListPlaybackCon
* // { // PlaybackConfiguration
* // AdDecisionServerUrl: "STRING_VALUE",
* // AvailSuppression: { // AvailSuppression
* // Mode: "OFF" || "BEHIND_LIVE_EDGE",
* // Mode: "OFF" || "BEHIND_LIVE_EDGE" || "AFTER_LIVE_EDGE",
* // Value: "STRING_VALUE",
* // FillPolicy: "FULL_AVAIL_ONLY" || "PARTIAL_AVAIL",
* // },
* // Bumper: { // Bumper
* // EndUrl: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ export interface PutPlaybackConfigurationCommandOutput extends PutPlaybackConfig
* const input = { // PutPlaybackConfigurationRequest
* AdDecisionServerUrl: "STRING_VALUE",
* AvailSuppression: { // AvailSuppression
* Mode: "OFF" || "BEHIND_LIVE_EDGE",
* Mode: "OFF" || "BEHIND_LIVE_EDGE" || "AFTER_LIVE_EDGE",
* Value: "STRING_VALUE",
* FillPolicy: "FULL_AVAIL_ONLY" || "PARTIAL_AVAIL",
* },
* Bumper: { // Bumper
* EndUrl: "STRING_VALUE",
Expand Down Expand Up @@ -85,8 +86,9 @@ export interface PutPlaybackConfigurationCommandOutput extends PutPlaybackConfig
* // { // PutPlaybackConfigurationResponse
* // AdDecisionServerUrl: "STRING_VALUE",
* // AvailSuppression: { // AvailSuppression
* // Mode: "OFF" || "BEHIND_LIVE_EDGE",
* // Mode: "OFF" || "BEHIND_LIVE_EDGE" || "AFTER_LIVE_EDGE",
* // Value: "STRING_VALUE",
* // FillPolicy: "FULL_AVAIL_ONLY" || "PARTIAL_AVAIL",
* // },
* // Bumper: { // Bumper
* // EndUrl: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
};

export interface EndpointParameters extends __EndpointParameters {
Region: string;
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
Expand Down
39 changes: 20 additions & 19 deletions clients/client-mediatailor/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/mediatailor.json */

const q="fn",
r="argv",
s="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h={"required":true,"default":false,"type":"Boolean"},
i={[s]:"Endpoint"},
j={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]},
k={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]},
l={},
m={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsFIPS"]}]},
n={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsDualStack"]}]},
const q="required",
r="fn",
s="argv",
t="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f={[q]:false,"type":"String"},
g={[q]:true,"default":false,"type":"Boolean"},
h={[t]:"Endpoint"},
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
k={},
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
n=[i],
o=[j],
p=[k];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[q]:"isSet",[r]:[i]}],type:e,rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:p,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:i,properties:l,headers:l},type:g}]}]},{conditions:[j,k],type:e,rules:[{conditions:[m,n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://api.mediatailor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:o,type:e,rules:[{conditions:[m],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://api.mediatailor-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://api.mediatailor.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://api.mediatailor.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]}]};
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://api.mediatailor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://api.mediatailor-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://api.mediatailor.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://api.mediatailor.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;
22 changes: 21 additions & 1 deletion clients/client-mediatailor/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,26 @@ export interface LiveSource {
Tags?: Record<string, string>;
}

/**
* @public
* @enum
*/
export const FillPolicy = {
FULL_AVAIL_ONLY: "FULL_AVAIL_ONLY",
PARTIAL_AVAIL: "PARTIAL_AVAIL",
} as const;

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

/**
* @public
* @enum
*/
export const Mode = {
AFTER_LIVE_EDGE: "AFTER_LIVE_EDGE",
BEHIND_LIVE_EDGE: "BEHIND_LIVE_EDGE",
OFF: "OFF",
} as const;
Expand All @@ -472,14 +487,19 @@ export type Mode = (typeof Mode)[keyof typeof Mode];
*/
export interface AvailSuppression {
/**
* <p>Sets the ad suppression mode. By default, ad suppression is off and all ad breaks are filled with ads or slate. When Mode is set to <code>BEHIND_LIVE_EDGE</code>, ad suppression is active and MediaTailor won't fill ad breaks on or behind the ad suppression Value time in the manifest lookback window.</p>
* <p>Sets the ad suppression mode. By default, ad suppression is off and all ad breaks are filled with ads or slate. When Mode is set to <code>BEHIND_LIVE_EDGE</code>, ad suppression is active and MediaTailor won't fill ad breaks on or behind the ad suppression Value time in the manifest lookback window. When Mode is set to <code>AFTER_LIVE_EDGE</code>, ad suppression is active and MediaTailor won't fill ad breaks that are within the live edge plus the avail suppression value.</p>
*/
Mode?: Mode | string;

/**
* <p>A live edge offset time in HH:MM:SS. MediaTailor won't fill ad breaks on or behind this time in the manifest lookback window. If Value is set to 00:00:00, it is in sync with the live edge, and MediaTailor won't fill any ad breaks on or behind the live edge. If you set a Value time, MediaTailor won't fill any ad breaks on or behind this time in the manifest lookback window. For example, if you set 00:45:00, then MediaTailor will fill ad breaks that occur within 45 minutes behind the live edge, but won't fill ad breaks on or behind 45 minutes behind the live edge.</p>
*/
Value?: string;

/**
* <p>Defines the policy to apply to the avail suppression mode. <code>BEHIND_LIVE_EDGE</code> will always use the full avail suppression policy. <code>AFTER_LIVE_EDGE</code> mode can be used to invoke partial ad break fills when a session starts mid-break.</p>
*/
FillPolicy?: FillPolicy | string;
}

/**
Expand Down
Loading

0 comments on commit 03ea04c

Please sign in to comment.