Skip to content
v2.276.0

Experimental

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

InputSource Class ​

A source for a pull-type input.

Use the static factory methods to create.

Example ​

ts
declare const stack: Stack;
declare const bucket: s3.IBucket;

new medialive.Input(stack, 'FileInput', {
  inputName: 'mp4-file',
  input: medialive.InputConfiguration.mp4File([
    medialive.InputSource.fromBucket(bucket, 'media/input.mp4'),
  ]),
});
python
# stack: Stack
# bucket: s3.IBucket


medialive.Input(stack, "FileInput",
    input_name="mp4-file",
    input=medialive.InputConfiguration.mp4_file([
        medialive.InputSource.from_bucket(bucket, "media/input.mp4")
    ])
)
java
Stack stack;
IBucket bucket;


Input.Builder.create(stack, "FileInput")
        .inputName("mp4-file")
        .input(InputConfiguration.mp4File(List.of(InputSource.fromBucket(bucket, "media/input.mp4"))))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
Stack stack;
IBucket bucket;


new Input(stack, "FileInput", new InputProps {
    InputName = "mp4-file",
    Input = InputConfiguration.Mp4File(new [] { InputSource.FromBucket(bucket, "media/input.mp4") })
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
var stack Stack
var bucket IBucket


medialive.NewInput(stack, jsii.String("FileInput"), &InputProps{
	InputName: jsii.String("mp4-file"),
	Input: medialive.InputConfiguration_Mp4File([]InputSource{
		medialive.InputSource_FromBucket(bucket, jsii.String("media/input.mp4")),
	}),
})

Initializer ​

ts
new InputSource()
python
InputSource()
java
new InputSource()
csharp
new InputSource()
go
NewInputSource()

Methods ​

fromBucket(bucket: IBucket, key: string): InputSource // chainable@staticmethod def from_bucket(bucket: IBucket, key: str) -> InputSourcepublic static InputSource fromBucket(IBucket bucket, String key)public static InputSource FromBucket(IBucket bucket, string key)func FromBucket(Bucket IBucket, Key *string) InputSourcestatic#
Create a source from an S3 bucket.

Automatically grants read access to the channel's role.

2 parameters

Parameters

  • bucketbucketbucketbucketBucket — The S3 bucket containing the source file.
  • keykeykeykeyKey — The object key within the bucket (e.g. 'videos/intro.mp4').
url(url: string, options?: InputSourceOptions): InputSource // chainable@staticmethod def url(url: str, options: typing.Optional[InputSourceOptions] = None) -> InputSourcepublic static InputSource url(String url, InputSourceOptions options)public static InputSource Url(string url, InputSourceOptions? options = null)func Url(Url *string, Options InputSourceOptions) InputSourcestatic#
Create a source from a URL.
2 parameters

Parameters

  • urlurlurlurlUrl — The URL where MediaLive pulls the source content from.
  • optionsoptionsoptionsoptionsOptions — Optional credentials.