From 1737bf6183f15701b0edfa43606dd37b5f619430 Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 29 Jun 2022 18:24:29 +0000 Subject: [PATCH] feat(client-medialive): This release adds support for automatic renewal of MediaLive reservations at the end of each reservation term. Automatic renewal is optional. This release also adds support for labelling accessibility-focused audio and caption tracks in HLS outputs. --- .../src/commands/UpdateMultiplexCommand.ts | 2 +- .../commands/UpdateMultiplexProgramCommand.ts | 3 +- .../client-medialive/src/models/models_0.ts | 17 ++- .../client-medialive/src/models/models_1.ts | 134 ++++++++---------- .../client-medialive/src/models/models_2.ts | 91 +++++++++++- .../src/protocols/Aws_restJson1.ts | 38 +++++ codegen/sdk-codegen/aws-models/medialive.json | 134 +++++++++++++++++- 7 files changed, 329 insertions(+), 90 deletions(-) diff --git a/clients/client-medialive/src/commands/UpdateMultiplexCommand.ts b/clients/client-medialive/src/commands/UpdateMultiplexCommand.ts index 25856d0d89fb..bb6176fc4bab 100644 --- a/clients/client-medialive/src/commands/UpdateMultiplexCommand.ts +++ b/clients/client-medialive/src/commands/UpdateMultiplexCommand.ts @@ -13,7 +13,7 @@ import { } from "@aws-sdk/types"; import { MediaLiveClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaLiveClient"; -import { UpdateMultiplexRequest, UpdateMultiplexResponse } from "../models/models_1"; +import { UpdateMultiplexRequest, UpdateMultiplexResponse } from "../models/models_2"; import { deserializeAws_restJson1UpdateMultiplexCommand, serializeAws_restJson1UpdateMultiplexCommand, diff --git a/clients/client-medialive/src/commands/UpdateMultiplexProgramCommand.ts b/clients/client-medialive/src/commands/UpdateMultiplexProgramCommand.ts index ba7b0922b06e..d27ccecef182 100644 --- a/clients/client-medialive/src/commands/UpdateMultiplexProgramCommand.ts +++ b/clients/client-medialive/src/commands/UpdateMultiplexProgramCommand.ts @@ -13,8 +13,7 @@ import { } from "@aws-sdk/types"; import { MediaLiveClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaLiveClient"; -import { UpdateMultiplexProgramRequest } from "../models/models_1"; -import { UpdateMultiplexProgramResponse } from "../models/models_2"; +import { UpdateMultiplexProgramRequest, UpdateMultiplexProgramResponse } from "../models/models_2"; import { deserializeAws_restJson1UpdateMultiplexProgramCommand, serializeAws_restJson1UpdateMultiplexProgramCommand, diff --git a/clients/client-medialive/src/models/models_0.ts b/clients/client-medialive/src/models/models_0.ts index a6354589b9ae..f2eaaa388526 100644 --- a/clients/client-medialive/src/models/models_0.ts +++ b/clients/client-medialive/src/models/models_0.ts @@ -1060,6 +1060,11 @@ export namespace BatchSuccessfulResultModel { }); } +export enum AccessibilityType { + DOES_NOT_IMPLEMENT_ACCESSIBILITY_FEATURES = "DOES_NOT_IMPLEMENT_ACCESSIBILITY_FEATURES", + IMPLEMENTS_ACCESSIBILITY_FEATURES = "IMPLEMENTS_ACCESSIBILITY_FEATURES", +} + /** * Arib Destination Settings */ @@ -1667,6 +1672,11 @@ export namespace CaptionDestinationSettings { * Caption Description */ export interface CaptionDescription { + /** + * Indicates whether the caption track implements accessibility features such as written descriptions of spoken dialog, music, and sounds. + */ + Accessibility?: AccessibilityType | string; + /** * Specifies which input caption selector to use as a caption source when generating output captions. This field should match a captionSelector name. */ @@ -3291,6 +3301,7 @@ export enum DeviceSettingsSyncState { export enum DeviceUpdateStatus { NOT_UP_TO_DATE = "NOT_UP_TO_DATE", + UPDATING = "UPDATING", UP_TO_DATE = "UP_TO_DATE", } @@ -5712,9 +5723,3 @@ export enum HlsStreamInfResolution { EXCLUDE = "EXCLUDE", INCLUDE = "INCLUDE", } - -export enum HlsTimedMetadataId3Frame { - NONE = "NONE", - PRIV = "PRIV", - TDRL = "TDRL", -} diff --git a/clients/client-medialive/src/models/models_1.ts b/clients/client-medialive/src/models/models_1.ts index 655e5306b166..8a6ed8dfa426 100644 --- a/clients/client-medialive/src/models/models_1.ts +++ b/clients/client-medialive/src/models/models_1.ts @@ -40,7 +40,6 @@ import { HlsRedundantManifest, HlsSegmentationMode, HlsStreamInfResolution, - HlsTimedMetadataId3Frame, IFrameOnlyPlaylistType, Input, InputAttachment, @@ -89,6 +88,12 @@ import { VpcOutputSettingsDescription, } from "./models_0"; +export enum HlsTimedMetadataId3Frame { + NONE = "NONE", + PRIV = "PRIV", + TDRL = "TDRL", +} + export enum HlsTsFileMode { SEGMENTED_FILES = "SEGMENTED_FILES", SINGLE_FILE = "SINGLE_FILE", @@ -823,6 +828,36 @@ export namespace PipelinePauseStateSettings { }); } +export enum ReservationAutomaticRenewal { + DISABLED = "DISABLED", + ENABLED = "ENABLED", + UNAVAILABLE = "UNAVAILABLE", +} + +/** + * The Renewal settings for Reservations + */ +export interface RenewalSettings { + /** + * Automatic renewal status for the reservation + */ + AutomaticRenewal?: ReservationAutomaticRenewal | string; + + /** + * Count for the reservation renewal + */ + RenewalCount?: number; +} + +export namespace RenewalSettings { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RenewalSettings): any => ({ + ...obj, + }); +} + export enum ReservationState { ACTIVE = "ACTIVE", CANCELED = "CANCELED", @@ -894,6 +929,11 @@ export interface Reservation { */ Region?: string; + /** + * Renewal settings for the reservation + */ + RenewalSettings?: RenewalSettings; + /** * Unique reservation ID, e.g. '1234567' */ @@ -5430,6 +5470,11 @@ export interface DeleteReservationResponse { */ Region?: string; + /** + * Renewal settings for the reservation + */ + RenewalSettings?: RenewalSettings; + /** * Unique reservation ID, e.g. '1234567' */ @@ -6303,6 +6348,11 @@ export interface DescribeReservationResponse { */ Region?: string; + /** + * Renewal settings for the reservation + */ + RenewalSettings?: RenewalSettings; + /** * Unique reservation ID, e.g. '1234567' */ @@ -7038,6 +7088,11 @@ export interface PurchaseOfferingRequest { */ OfferingId: string | undefined; + /** + * Renewal settings for the reservation + */ + RenewalSettings?: RenewalSettings; + /** * Unique request ID to be specified. This is needed to prevent retries from creating multiple resources. */ @@ -7942,80 +7997,3 @@ export namespace UpdateInputSecurityGroupResponse { ...obj, }); } - -/** - * A request to update a multiplex. - */ -export interface UpdateMultiplexRequest { - /** - * ID of the multiplex to update. - */ - MultiplexId: string | undefined; - - /** - * The new settings for a multiplex. - */ - MultiplexSettings?: MultiplexSettings; - - /** - * Name of the multiplex. - */ - Name?: string; -} - -export namespace UpdateMultiplexRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateMultiplexRequest): any => ({ - ...obj, - }); -} - -/** - * Placeholder documentation for UpdateMultiplexResponse - */ -export interface UpdateMultiplexResponse { - /** - * The updated multiplex. - */ - Multiplex?: Multiplex; -} - -export namespace UpdateMultiplexResponse { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateMultiplexResponse): any => ({ - ...obj, - }); -} - -/** - * A request to update a program in a multiplex. - */ -export interface UpdateMultiplexProgramRequest { - /** - * The ID of the multiplex of the program to update. - */ - MultiplexId: string | undefined; - - /** - * The new settings for a multiplex program. - */ - MultiplexProgramSettings?: MultiplexProgramSettings; - - /** - * The name of the program to update. - */ - ProgramName: string | undefined; -} - -export namespace UpdateMultiplexProgramRequest { - /** - * @internal - */ - export const filterSensitiveLog = (obj: UpdateMultiplexProgramRequest): any => ({ - ...obj, - }); -} diff --git a/clients/client-medialive/src/models/models_2.ts b/clients/client-medialive/src/models/models_2.ts index eab707aa226d..35a57fb19ac9 100644 --- a/clients/client-medialive/src/models/models_2.ts +++ b/clients/client-medialive/src/models/models_2.ts @@ -1,5 +1,89 @@ // smithy-typescript generated code -import { MultiplexProgram, Reservation } from "./models_1"; +import { + Multiplex, + MultiplexProgram, + MultiplexProgramSettings, + MultiplexSettings, + RenewalSettings, + Reservation, +} from "./models_1"; + +/** + * A request to update a multiplex. + */ +export interface UpdateMultiplexRequest { + /** + * ID of the multiplex to update. + */ + MultiplexId: string | undefined; + + /** + * The new settings for a multiplex. + */ + MultiplexSettings?: MultiplexSettings; + + /** + * Name of the multiplex. + */ + Name?: string; +} + +export namespace UpdateMultiplexRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateMultiplexRequest): any => ({ + ...obj, + }); +} + +/** + * Placeholder documentation for UpdateMultiplexResponse + */ +export interface UpdateMultiplexResponse { + /** + * The updated multiplex. + */ + Multiplex?: Multiplex; +} + +export namespace UpdateMultiplexResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateMultiplexResponse): any => ({ + ...obj, + }); +} + +/** + * A request to update a program in a multiplex. + */ +export interface UpdateMultiplexProgramRequest { + /** + * The ID of the multiplex of the program to update. + */ + MultiplexId: string | undefined; + + /** + * The new settings for a multiplex program. + */ + MultiplexProgramSettings?: MultiplexProgramSettings; + + /** + * The name of the program to update. + */ + ProgramName: string | undefined; +} + +export namespace UpdateMultiplexProgramRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateMultiplexProgramRequest): any => ({ + ...obj, + }); +} /** * Placeholder documentation for UpdateMultiplexProgramResponse @@ -29,6 +113,11 @@ export interface UpdateReservationRequest { */ Name?: string; + /** + * Renewal settings for the reservation + */ + RenewalSettings?: RenewalSettings; + /** * Unique reservation ID, e.g. '1234567' */ diff --git a/clients/client-medialive/src/protocols/Aws_restJson1.ts b/clients/client-medialive/src/protocols/Aws_restJson1.ts index 8667e0a87633..4778d9a9fcdc 100644 --- a/clients/client-medialive/src/protocols/Aws_restJson1.ts +++ b/clients/client-medialive/src/protocols/Aws_restJson1.ts @@ -351,6 +351,7 @@ import { PipelinePauseStateSettings, Rec601Settings, Rec709Settings, + RenewalSettings, Reservation, RtmpAdMarkers, RtmpGroupSettings, @@ -1726,6 +1727,10 @@ export const serializeAws_restJson1PurchaseOfferingCommand = async ( body = JSON.stringify({ ...(input.Count !== undefined && input.Count !== null && { count: input.Count }), ...(input.Name !== undefined && input.Name !== null && { name: input.Name }), + ...(input.RenewalSettings !== undefined && + input.RenewalSettings !== null && { + renewalSettings: serializeAws_restJson1RenewalSettings(input.RenewalSettings, context), + }), requestId: input.RequestId ?? generateIdempotencyToken(), ...(input.Start !== undefined && input.Start !== null && { start: input.Start }), ...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }), @@ -2266,6 +2271,10 @@ export const serializeAws_restJson1UpdateReservationCommand = async ( let body: any; body = JSON.stringify({ ...(input.Name !== undefined && input.Name !== null && { name: input.Name }), + ...(input.RenewalSettings !== undefined && + input.RenewalSettings !== null && { + renewalSettings: serializeAws_restJson1RenewalSettings(input.RenewalSettings, context), + }), }); return new __HttpRequest({ protocol, @@ -3628,6 +3637,7 @@ export const deserializeAws_restJson1DeleteReservationCommand = async ( OfferingId: undefined, OfferingType: undefined, Region: undefined, + RenewalSettings: undefined, ReservationId: undefined, ResourceSpecification: undefined, Start: undefined, @@ -3672,6 +3682,9 @@ export const deserializeAws_restJson1DeleteReservationCommand = async ( if (data.region !== undefined && data.region !== null) { contents.Region = __expectString(data.region); } + if (data.renewalSettings !== undefined && data.renewalSettings !== null) { + contents.RenewalSettings = deserializeAws_restJson1RenewalSettings(data.renewalSettings, context); + } if (data.reservationId !== undefined && data.reservationId !== null) { contents.ReservationId = __expectString(data.reservationId); } @@ -4677,6 +4690,7 @@ export const deserializeAws_restJson1DescribeReservationCommand = async ( OfferingId: undefined, OfferingType: undefined, Region: undefined, + RenewalSettings: undefined, ReservationId: undefined, ResourceSpecification: undefined, Start: undefined, @@ -4721,6 +4735,9 @@ export const deserializeAws_restJson1DescribeReservationCommand = async ( if (data.region !== undefined && data.region !== null) { contents.Region = __expectString(data.region); } + if (data.renewalSettings !== undefined && data.renewalSettings !== null) { + contents.RenewalSettings = deserializeAws_restJson1RenewalSettings(data.renewalSettings, context); + } if (data.reservationId !== undefined && data.reservationId !== null) { contents.ReservationId = __expectString(data.reservationId); } @@ -7618,6 +7635,7 @@ const serializeAws_restJson1BurnInDestinationSettings = ( const serializeAws_restJson1CaptionDescription = (input: CaptionDescription, context: __SerdeContext): any => { return { + ...(input.Accessibility !== undefined && input.Accessibility !== null && { accessibility: input.Accessibility }), ...(input.CaptionSelectorName !== undefined && input.CaptionSelectorName !== null && { captionSelectorName: input.CaptionSelectorName }), ...(input.DestinationSettings !== undefined && @@ -9474,6 +9492,14 @@ const serializeAws_restJson1RemixSettings = (input: RemixSettings, context: __Se }; }; +const serializeAws_restJson1RenewalSettings = (input: RenewalSettings, context: __SerdeContext): any => { + return { + ...(input.AutomaticRenewal !== undefined && + input.AutomaticRenewal !== null && { automaticRenewal: input.AutomaticRenewal }), + ...(input.RenewalCount !== undefined && input.RenewalCount !== null && { renewalCount: input.RenewalCount }), + }; +}; + const serializeAws_restJson1RtmpCaptionInfoDestinationSettings = ( input: RtmpCaptionInfoDestinationSettings, context: __SerdeContext @@ -11107,6 +11133,7 @@ const deserializeAws_restJson1BurnInDestinationSettings = ( const deserializeAws_restJson1CaptionDescription = (output: any, context: __SerdeContext): CaptionDescription => { return { + Accessibility: __expectString(output.accessibility), CaptionSelectorName: __expectString(output.captionSelectorName), DestinationSettings: output.destinationSettings !== undefined && output.destinationSettings !== null @@ -13138,6 +13165,13 @@ const deserializeAws_restJson1RemixSettings = (output: any, context: __SerdeCont } as any; }; +const deserializeAws_restJson1RenewalSettings = (output: any, context: __SerdeContext): RenewalSettings => { + return { + AutomaticRenewal: __expectString(output.automaticRenewal), + RenewalCount: __expectInt32(output.renewalCount), + } as any; +}; + const deserializeAws_restJson1Reservation = (output: any, context: __SerdeContext): Reservation => { return { Arn: __expectString(output.arn), @@ -13152,6 +13186,10 @@ const deserializeAws_restJson1Reservation = (output: any, context: __SerdeContex OfferingId: __expectString(output.offeringId), OfferingType: __expectString(output.offeringType), Region: __expectString(output.region), + RenewalSettings: + output.renewalSettings !== undefined && output.renewalSettings !== null + ? deserializeAws_restJson1RenewalSettings(output.renewalSettings, context) + : undefined, ReservationId: __expectString(output.reservationId), ResourceSpecification: output.resourceSpecification !== undefined && output.resourceSpecification !== null diff --git a/codegen/sdk-codegen/aws-models/medialive.json b/codegen/sdk-codegen/aws-models/medialive.json index 308b300abe16..f8e69ff773f6 100644 --- a/codegen/sdk-codegen/aws-models/medialive.json +++ b/codegen/sdk-codegen/aws-models/medialive.json @@ -486,6 +486,22 @@ "smithy.api#documentation": "Placeholder documentation for AcceptInputDeviceTransferResponse" } }, + "com.amazonaws.medialive#AccessibilityType": { + "type": "string", + "traits": { + "smithy.api#documentation": "Accessibility Type", + "smithy.api#enum": [ + { + "value": "DOES_NOT_IMPLEMENT_ACCESSIBILITY_FEATURES", + "name": "DOES_NOT_IMPLEMENT_ACCESSIBILITY_FEATURES" + }, + { + "value": "IMPLEMENTS_ACCESSIBILITY_FEATURES", + "name": "IMPLEMENTS_ACCESSIBILITY_FEATURES" + } + ] + } + }, "com.amazonaws.medialive#AfdSignaling": { "type": "string", "traits": { @@ -773,7 +789,7 @@ } }, "Name": { - "target": "com.amazonaws.medialive#__string", + "target": "com.amazonaws.medialive#__stringMax255", "traits": { "smithy.api#documentation": "The name of this AudioDescription. Outputs will use this name to uniquely identify this AudioDescription. Description names should be unique within this Live Event.", "smithy.api#jsonName": "name", @@ -2263,6 +2279,13 @@ "com.amazonaws.medialive#CaptionDescription": { "type": "structure", "members": { + "Accessibility": { + "target": "com.amazonaws.medialive#AccessibilityType", + "traits": { + "smithy.api#documentation": "Indicates whether the caption track implements accessibility features such as written descriptions of spoken dialog, music, and sounds.", + "smithy.api#jsonName": "accessibility" + } + }, "CaptionSelectorName": { "target": "com.amazonaws.medialive#__string", "traits": { @@ -3679,6 +3702,9 @@ "input": { "target": "com.amazonaws.medialive#CreateTagsRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.medialive#BadRequestException" @@ -4436,6 +4462,13 @@ "smithy.api#jsonName": "region" } }, + "RenewalSettings": { + "target": "com.amazonaws.medialive#RenewalSettings", + "traits": { + "smithy.api#documentation": "Renewal settings for the reservation", + "smithy.api#jsonName": "renewalSettings" + } + }, "ReservationId": { "target": "com.amazonaws.medialive#__string", "traits": { @@ -4551,6 +4584,9 @@ "input": { "target": "com.amazonaws.medialive#DeleteTagsRequest" }, + "output": { + "target": "smithy.api#Unit" + }, "errors": [ { "target": "com.amazonaws.medialive#BadRequestException" @@ -6234,6 +6270,13 @@ "smithy.api#jsonName": "region" } }, + "RenewalSettings": { + "target": "com.amazonaws.medialive#RenewalSettings", + "traits": { + "smithy.api#documentation": "Renewal settings for the reservation", + "smithy.api#jsonName": "renewalSettings" + } + }, "ReservationId": { "target": "com.amazonaws.medialive#__string", "traits": { @@ -6405,6 +6448,10 @@ { "value": "NOT_UP_TO_DATE", "name": "NOT_UP_TO_DATE" + }, + { + "value": "UPDATING", + "name": "UPDATING" } ] } @@ -11395,7 +11442,7 @@ } }, "Uri": { - "target": "com.amazonaws.medialive#__string", + "target": "com.amazonaws.medialive#__stringMax2048", "traits": { "smithy.api#documentation": "Uniform Resource Identifier - This should be a path to a file accessible to the Live system (eg. a http:// URI) depending on the output type. For example, a RTMP destination should have a uri simliar to: \"rtmp://fmsserver/live\".", "smithy.api#jsonName": "uri", @@ -16357,6 +16404,13 @@ "smithy.api#required": {} } }, + "RenewalSettings": { + "target": "com.amazonaws.medialive#RenewalSettings", + "traits": { + "smithy.api#documentation": "Renewal settings for the reservation", + "smithy.api#jsonName": "renewalSettings" + } + }, "RequestId": { "target": "com.amazonaws.medialive#__string", "traits": { @@ -16518,6 +16572,28 @@ "smithy.api#documentation": "Remix Settings" } }, + "com.amazonaws.medialive#RenewalSettings": { + "type": "structure", + "members": { + "AutomaticRenewal": { + "target": "com.amazonaws.medialive#ReservationAutomaticRenewal", + "traits": { + "smithy.api#documentation": "Automatic renewal status for the reservation", + "smithy.api#jsonName": "automaticRenewal" + } + }, + "RenewalCount": { + "target": "com.amazonaws.medialive#__integerMin1", + "traits": { + "smithy.api#documentation": "Count for the reservation renewal", + "smithy.api#jsonName": "renewalCount" + } + } + }, + "traits": { + "smithy.api#documentation": "The Renewal settings for Reservations" + } + }, "com.amazonaws.medialive#Reservation": { "type": "structure", "members": { @@ -16605,6 +16681,13 @@ "smithy.api#jsonName": "region" } }, + "RenewalSettings": { + "target": "com.amazonaws.medialive#RenewalSettings", + "traits": { + "smithy.api#documentation": "Renewal settings for the reservation", + "smithy.api#jsonName": "renewalSettings" + } + }, "ReservationId": { "target": "com.amazonaws.medialive#__string", "traits": { @@ -16652,6 +16735,26 @@ "smithy.api#documentation": "Reserved resources available to use" } }, + "com.amazonaws.medialive#ReservationAutomaticRenewal": { + "type": "string", + "traits": { + "smithy.api#documentation": "Automatic Renewal Status for Reservation", + "smithy.api#enum": [ + { + "value": "DISABLED", + "name": "DISABLED" + }, + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "UNAVAILABLE", + "name": "UNAVAILABLE" + } + ] + } + }, "com.amazonaws.medialive#ReservationCodec": { "type": "string", "traits": { @@ -20093,6 +20196,13 @@ "smithy.api#jsonName": "name" } }, + "RenewalSettings": { + "target": "com.amazonaws.medialive#RenewalSettings", + "traits": { + "smithy.api#documentation": "Renewal settings for the reservation", + "smithy.api#jsonName": "renewalSettings" + } + }, "ReservationId": { "target": "com.amazonaws.medialive#__string", "traits": { @@ -21639,6 +21749,26 @@ } } }, + "com.amazonaws.medialive#__stringMax2048": { + "type": "string", + "traits": { + "smithy.api#documentation": "Placeholder documentation for __stringMax2048", + "smithy.api#length": { + "min": 0, + "max": 2048 + } + } + }, + "com.amazonaws.medialive#__stringMax255": { + "type": "string", + "traits": { + "smithy.api#documentation": "Placeholder documentation for __stringMax255", + "smithy.api#length": { + "min": 0, + "max": 255 + } + } + }, "com.amazonaws.medialive#__stringMax256": { "type": "string", "traits": {