Skip to content
v2.274.0

Experimental

@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

Input L2 construct ​

Defines an AWS Elemental MediaLive Input.

Example ​

ts
declare const stack: Stack;
declare const passphrase: secretsmanager.ISecret;

const sg = new medialive.InputSecurityGroup(stack, 'SrtSg', {
  allowlistRules: ['203.0.113.0/24'],
});

new medialive.Input(stack, 'SrtListenerInput', {
  inputName: 'srt-listener',
  input: medialive.InputConfiguration.srtListener({
    inputSecurityGroups: [sg],
    minimumLatency: Duration.millis(500),
    streamId: 'my-stream-id',
    decryption: {
      algorithm: medialive.SrtDecryptionAlgorithm.AES256,
      passphraseSecret: passphrase,
    },
  }),
});
python
# stack: Stack
# passphrase: secretsmanager.ISecret


sg = medialive.InputSecurityGroup(stack, "SrtSg",
    allowlist_rules=["203.0.113.0/24"]
)

medialive.Input(stack, "SrtListenerInput",
    input_name="srt-listener",
    input=medialive.InputConfiguration.srt_listener(
        input_security_groups=[sg],
        minimum_latency=Duration.millis(500),
        stream_id="my-stream-id",
        decryption=medialive.SrtDecryptionProps(
            algorithm=medialive.SrtDecryptionAlgorithm.AES256,
            passphrase_secret=passphrase
        )
    )
)
java
Stack stack;
ISecret passphrase;


InputSecurityGroup sg = InputSecurityGroup.Builder.create(stack, "SrtSg")
        .allowlistRules(List.of("203.0.113.0/24"))
        .build();

Input.Builder.create(stack, "SrtListenerInput")
        .inputName("srt-listener")
        .input(InputConfiguration.srtListener(SrtListenerInputProps.builder()
                .inputSecurityGroups(List.of(sg))
                .minimumLatency(Duration.millis(500))
                .streamId("my-stream-id")
                .decryption(SrtDecryptionProps.builder()
                        .algorithm(SrtDecryptionAlgorithm.AES256)
                        .passphraseSecret(passphrase)
                        .build())
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
Stack stack;
ISecret passphrase;


var sg = new InputSecurityGroup(stack, "SrtSg", new InputSecurityGroupProps {
    AllowlistRules = new [] { "203.0.113.0/24" }
});

new Input(stack, "SrtListenerInput", new InputProps {
    InputName = "srt-listener",
    Input = InputConfiguration.SrtListener(new SrtListenerInputProps {
        InputSecurityGroups = new [] { sg },
        MinimumLatency = Duration.Millis(500),
        StreamId = "my-stream-id",
        Decryption = new SrtDecryptionProps {
            Algorithm = SrtDecryptionAlgorithm.AES256,
            PassphraseSecret = passphrase
        }
    })
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
var stack Stack
var passphrase ISecret


sg := medialive.NewInputSecurityGroup(stack, jsii.String("SrtSg"), &InputSecurityGroupProps{
	AllowlistRules: []*string{
		jsii.String("203.0.113.0/24"),
	},
})

medialive.NewInput(stack, jsii.String("SrtListenerInput"), &InputProps{
	InputName: jsii.String("srt-listener"),
	Input: medialive.InputConfiguration_SrtListener(&SrtListenerInputProps{
		InputSecurityGroups: []IInputSecurityGroupRef{
			sg,
		},
		MinimumLatency: awscdk.Duration_Millis(jsii.Number(500)),
		StreamId: jsii.String("my-stream-id"),
		Decryption: &SrtDecryptionProps{
			Algorithm: medialive.SrtDecryptionAlgorithm_AES256(),
			PassphraseSecret: passphrase,
		},
	}),
})

Initializer ​

ts
new Input(scope: Construct, id: string, props: InputProps)
python
Input(scope: Construct, id: str, props: InputProps)
java
new Input(Construct scope, String id, InputProps props)
csharp
new Input(Construct scope, string id, InputProps props)
go
NewInput(Scope Construct, Id *string, Props InputProps)

Construct Props ​

Input configuration that defines the input type and source settings.
inputNamestringinput_namestrinputNameStringInputNamestringInputName*string= auto-generated#
Input name.
inputNetworkLocationInputNetworkLocationinput_network_locationInputNetworkLocationinputNetworkLocationInputNetworkLocationInputNetworkLocationInputNetworkLocationInputNetworkLocationInputNetworkLocation= AWS, applied by MediaLive#
The network location of the input — AWS cloud or on-premises (MediaLive Anywhere).
tags{ [key: string]: string }tagstyping.Mapping[str, str]tagsMap<String, String>TagsIDictionary<string, string>Tags*map[string]*string= no tags#
Tags to add to the input.

Properties ​

The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

inputArnstringinput_arnstrinputArnStringInputArnstringInputArn*stringrequired#
The Amazon Resource Name (ARN) of the input.
inputClassstringinput_classstrinputClassStringInputClassstringInputClass*string#
The input class (STANDARD or SINGLE_PIPELINE).

Only available for input types where the pipeline count is known at construct time (e.g. mediaConnectRouter). Undefined for imported inputs and other types.

inputDestinationsstring[]input_destinationstyping.List[str]inputDestinationsList<String>InputDestinationsstring[]InputDestinations*[]*string#
For push inputs, the destination URLs where the upstream system sends content.
inputIdstringinput_idstrinputIdStringInputIdstringInputId*stringrequired#
The ID of the input.
inputRefInputReferenceinput_refInputReferenceinputRefInputReferenceInputRefInputReferenceInputRefInputReferencerequired#
A reference to this Input resource.
inputSourcesstring[]input_sourcestyping.List[str]inputSourcesList<String>InputSourcesstring[]InputSources*[]*string#
For pull inputs, the source URLs where MediaLive pulls content from.
inputTypestringinput_typestrinputTypeStringInputTypestringInputType*string#
The input type (e.g. SRT_CALLER, MP4_FILE, URL_PULL). Undefined for imported inputs.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
PROPERTY_INJECTION_IDstringproperty_injection_idstrPROPERTY_INJECTION_IDStringPROPERTY_INJECTION_IDstringPROPERTY_INJECTION_ID*stringrequiredstatic#
Uniquely identifies this class.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.

Methods ​

applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#
Override the cross-stack reference strength for this resource.
notes · 1 parameter

When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.

Parameters

  • strengthstrengthstrengthstrengthStrength — - The reference strength to use for this resource.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

fromInputArn(scope: Construct, id: string, inputArn: string): IInput@staticmethod def from_input_arn(scope: Construct, id: str, input_arn: str) -> IInputpublic static IInput fromInputArn(Construct scope, String id, String inputArn)public static IInput FromInputArn(Construct scope, string id, string inputArn)func FromInputArn(Scope Construct, Id *string, InputArn *string) IInputstatic#
Import an existing input by its ARN.

The id is parsed out of the ARN.

isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#
Checks if `x` is a construct.
notes · 1 parameter · returns

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Construct.

isOwnedResource(construct: IConstruct): boolean@staticmethod def is_owned_resource(construct: IConstruct) -> boolpublic static Boolean isOwnedResource(IConstruct construct)public static bool IsOwnedResource(IConstruct construct)func IsOwnedResource(Construct IConstruct) *boolstatic#
Returns true if the construct was created by CDK, and false otherwise.
isResource(construct: IConstruct): boolean@staticmethod def is_resource(construct: IConstruct) -> boolpublic static Boolean isResource(IConstruct construct)public static bool IsResource(IConstruct construct)func IsResource(Construct IConstruct) *boolstatic#
Check whether the given construct is a Resource.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of this construct.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.