Class InputPreference

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.medialive.alpha.InputPreference
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:41.197Z") @Stability(Experimental) public class InputPreference extends software.amazon.jsii.JsiiObject
(experimental) Input preference when deciding which input to make active after a previously failed input has recovered.

Example:

 Stack stack;
 IInput primaryInput;
 IInput secondaryInput;
 AudioSelector audioSelector;
 EncodeConfiguration video;
 EncodeConfiguration audio;
 IBucket bucket;
 Channel.Builder.create(stack, "Channel")
         .inputs(List.of(InputAttachment.builder()
                 .input(primaryInput)
                 .automaticInputFailover(AutomaticInputFailover.builder()
                         .secondaryInput(secondaryInput)
                         .inputPreference(InputPreference.PRIMARY_INPUT_PREFERRED)
                         .errorClearTime(Duration.seconds(3))
                         .failoverConditions(List.of(FailoverCondition.inputLoss(InputLossFailoverProps.builder().threshold(Duration.millis(1500)).build()), FailoverCondition.audioSilence(AudioSilenceFailoverProps.builder().audioSelector(audioSelector).threshold(Duration.seconds(2)).build()), FailoverCondition.videoBlack(VideoBlackFailoverProps.builder().blackDetectThreshold(0.1).threshold(Duration.seconds(1)).build())))
                         .build())
                 .build(), InputAttachment.builder()
                 // The secondary input must also be attached to the channel as its own input.
                 .input(secondaryInput)
                 .build()))
         .outputGroups(List.of(OutputGroupConfiguration.hls(HlsOutputGroupProps.builder()
                 .name("hls")
                 .destinations(List.of(OutputDestination.toBucket(bucket, "live/stream")))
                 .outputs(List.of(HlsOutputDefinition.builder().encodes(List.of(video, audio)).outputName("hls_out").build()))
                 .build())))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final InputPreference
    (experimental) No preference — stay on the currently active input even after the other recovers.
    static final InputPreference
    (experimental) Prefer the primary input — switch back to it once it has been free of failover conditions for the error-clear time.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    InputPreference(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    InputPreference(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (experimental) The underlying string value passed to CloudFormation.
    of(String value)
    (experimental) A value not yet modelled by AWS CDK.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • EQUAL_INPUT_PREFERENCE

      @Stability(Experimental) public static final InputPreference EQUAL_INPUT_PREFERENCE
      (experimental) No preference — stay on the currently active input even after the other recovers.
    • PRIMARY_INPUT_PREFERRED

      @Stability(Experimental) public static final InputPreference PRIMARY_INPUT_PREFERRED
      (experimental) Prefer the primary input — switch back to it once it has been free of failover conditions for the error-clear time.
  • Constructor Details

    • InputPreference

      protected InputPreference(software.amazon.jsii.JsiiObjectRef objRef)
    • InputPreference

      protected InputPreference(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • of

      @Stability(Experimental) @NotNull public static InputPreference of(@NotNull String value)
      (experimental) A value not yet modelled by AWS CDK.

      Parameters:
      value - This parameter is required.
    • getValue

      @Stability(Experimental) @NotNull public String getValue()
      (experimental) The underlying string value passed to CloudFormation.