From e5811558346eed729862445b80af4aad2a23362d Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 9 Dec 2022 19:26:53 +0000 Subject: [PATCH] feat(client-medialive): Link devices now support buffer size (latency) configuration. A higher latency value means a longer delay in transmitting from the device to MediaLive, but improved resiliency. A lower latency value means a shorter delay, but less resiliency. --- .../client-medialive/src/endpoint/ruleset.ts | 9 -- .../client-medialive/src/models/models_0.ts | 11 ++ .../client-medialive/src/models/models_1.ts | 5 + .../src/protocols/Aws_restJson1.ts | 3 + codegen/sdk-codegen/aws-models/medialive.json | 101 +++++++++++++++--- 5 files changed, 104 insertions(+), 25 deletions(-) diff --git a/clients/client-medialive/src/endpoint/ruleset.ts b/clients/client-medialive/src/endpoint/ruleset.ts index 652777f30f2d..6ede4038ed66 100644 --- a/clients/client-medialive/src/endpoint/ruleset.ts +++ b/clients/client-medialive/src/endpoint/ruleset.ts @@ -58,15 +58,6 @@ export const ruleSet: RuleSetObject = { }, ], }, - { - fn: "parseURL", - argv: [ - { - ref: "Endpoint", - }, - ], - assign: "url", - }, ], type: "tree", rules: [ diff --git a/clients/client-medialive/src/models/models_0.ts b/clients/client-medialive/src/models/models_0.ts index cc9015831a21..98c7a9016465 100644 --- a/clients/client-medialive/src/models/models_0.ts +++ b/clients/client-medialive/src/models/models_0.ts @@ -2665,6 +2665,11 @@ export interface InputDeviceHdSettings { * The width of the video source, in pixels. */ Width?: number; + + /** + * The Link device's buffer size (latency) in milliseconds (ms). You can specify this value. + */ + LatencyMs?: number; } export enum InputDeviceIpScheme { @@ -2704,6 +2709,7 @@ export interface InputDeviceNetworkSettings { export enum InputDeviceType { HD = "HD", + UHD = "UHD", } /** @@ -2749,6 +2755,11 @@ export interface InputDeviceUhdSettings { * The width of the video source, in pixels. */ Width?: number; + + /** + * The Link device's buffer size (latency) in milliseconds (ms). You can specify this value. + */ + LatencyMs?: number; } /** diff --git a/clients/client-medialive/src/models/models_1.ts b/clients/client-medialive/src/models/models_1.ts index e2b13cbf0bcf..6522476611b3 100644 --- a/clients/client-medialive/src/models/models_1.ts +++ b/clients/client-medialive/src/models/models_1.ts @@ -5226,6 +5226,11 @@ export interface InputDeviceConfigurableSettings { * The maximum bitrate in bits per second. Set a value here to throttle the bitrate of the source video. */ MaxBitrate?: number; + + /** + * The Link device's buffer size (latency) in milliseconds (ms). + */ + LatencyMs?: number; } /** diff --git a/clients/client-medialive/src/protocols/Aws_restJson1.ts b/clients/client-medialive/src/protocols/Aws_restJson1.ts index d50b15566242..7abe3aef74e3 100644 --- a/clients/client-medialive/src/protocols/Aws_restJson1.ts +++ b/clients/client-medialive/src/protocols/Aws_restJson1.ts @@ -7882,6 +7882,7 @@ const serializeAws_restJson1InputDeviceConfigurableSettings = ( ): any => { return { ...(input.ConfiguredInput != null && { configuredInput: input.ConfiguredInput }), + ...(input.LatencyMs != null && { latencyMs: input.LatencyMs }), ...(input.MaxBitrate != null && { maxBitrate: input.MaxBitrate }), }; }; @@ -11178,6 +11179,7 @@ const deserializeAws_restJson1InputDeviceHdSettings = (output: any, context: __S DeviceState: __expectString(output.deviceState), Framerate: __limitedParseDouble(output.framerate), Height: __expectInt32(output.height), + LatencyMs: __expectInt32(output.latencyMs), MaxBitrate: __expectInt32(output.maxBitrate), ScanType: __expectString(output.scanType), Width: __expectInt32(output.width), @@ -11240,6 +11242,7 @@ const deserializeAws_restJson1InputDeviceUhdSettings = ( DeviceState: __expectString(output.deviceState), Framerate: __limitedParseDouble(output.framerate), Height: __expectInt32(output.height), + LatencyMs: __expectInt32(output.latencyMs), MaxBitrate: __expectInt32(output.maxBitrate), ScanType: __expectString(output.scanType), Width: __expectInt32(output.width), diff --git a/codegen/sdk-codegen/aws-models/medialive.json b/codegen/sdk-codegen/aws-models/medialive.json index 54d92e699d4a..ade08df27532 100644 --- a/codegen/sdk-codegen/aws-models/medialive.json +++ b/codegen/sdk-codegen/aws-models/medialive.json @@ -12215,6 +12215,14 @@ "smithy.api#documentation": "The maximum bitrate in bits per second. Set a value here to throttle the bitrate of the source video.", "smithy.api#jsonName": "maxBitrate" } + }, + "LatencyMs": { + "target": "com.amazonaws.medialive#__integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "The Link device's buffer size (latency) in milliseconds (ms).", + "smithy.api#jsonName": "latencyMs" + } } }, "traits": { @@ -12329,6 +12337,14 @@ "smithy.api#documentation": "The width of the video source, in pixels.", "smithy.api#jsonName": "width" } + }, + "LatencyMs": { + "target": "com.amazonaws.medialive#__integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "The Link device's buffer size (latency) in milliseconds (ms). You can specify this value.", + "smithy.api#jsonName": "latencyMs" + } } }, "traits": { @@ -12595,6 +12611,12 @@ "traits": { "smithy.api#enumValue": "HD" } + }, + "UHD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UHD" + } } }, "traits": { @@ -12663,6 +12685,14 @@ "smithy.api#documentation": "The width of the video source, in pixels.", "smithy.api#jsonName": "width" } + }, + "LatencyMs": { + "target": "com.amazonaws.medialive#__integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "The Link device's buffer size (latency) in milliseconds (ms). You can specify this value.", + "smithy.api#jsonName": "latencyMs" + } } }, "traits": { @@ -15959,15 +15989,6 @@ "ref": "Endpoint" } ] - }, - { - "fn": "parseURL", - "argv": [ - { - "ref": "Endpoint" - } - ], - "assign": "url" } ], "type": "tree", @@ -16228,8 +16249,8 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, "UseFIPS": true, + "UseDualStack": true, "Region": "us-iso-east-1" } }, @@ -16241,8 +16262,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Region": "us-iso-east-1" } }, @@ -16252,8 +16273,8 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Region": "us-iso-east-1" } }, @@ -16265,11 +16286,59 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Region": "us-iso-east-1" } }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "UseFIPS": true, + "UseDualStack": true, + "Region": "us-isob-east-1" + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "UseFIPS": true, + "UseDualStack": false, + "Region": "us-isob-east-1" + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "UseFIPS": false, + "UseDualStack": true, + "Region": "us-isob-east-1" + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://medialive.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Region": "us-isob-east-1" + } + }, { "documentation": "For custom endpoint with fips disabled and dualstack disabled", "expect": { @@ -16278,8 +16347,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Region": "us-east-1", "Endpoint": "https://example.com" } @@ -16290,8 +16359,8 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Region": "us-east-1", "Endpoint": "https://example.com" } @@ -16302,8 +16371,8 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Region": "us-east-1", "Endpoint": "https://example.com" }