CfnInput

class aws_cdk.aws_medialive.CfnInput(scope, id, *, destinations=None, input_devices=None, input_security_groups=None, media_connect_flows=None, name=None, role_arn=None, sources=None, tags=None, type=None, vpc=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::MediaLive::Input.

The AWS::MediaLive::Input resource is a MediaLive resource type that creates an input.

A MediaLive input holds information that describes how the MediaLive channel is connected to the upstream system that is providing the source content that is to be transcoded.

CloudformationResource

AWS::MediaLive::Input

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive as medialive

# tags: Any

cfn_input = medialive.CfnInput(self, "MyCfnInput",
    destinations=[medialive.CfnInput.InputDestinationRequestProperty(
        stream_name="streamName"
    )],
    input_devices=[medialive.CfnInput.InputDeviceSettingsProperty(
        id="id"
    )],
    input_security_groups=["inputSecurityGroups"],
    media_connect_flows=[medialive.CfnInput.MediaConnectFlowRequestProperty(
        flow_arn="flowArn"
    )],
    name="name",
    role_arn="roleArn",
    sources=[medialive.CfnInput.InputSourceRequestProperty(
        password_param="passwordParam",
        url="url",
        username="username"
    )],
    tags=tags,
    type="type",
    vpc=medialive.CfnInput.InputVpcRequestProperty(
        security_group_ids=["securityGroupIds"],
        subnet_ids=["subnetIds"]
    )
)

Create a new AWS::MediaLive::Input.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • destinations (Union[IResolvable, Sequence[Union[IResolvable, InputDestinationRequestProperty]], None]) – Settings that apply only if the input is a push type of input.

  • input_devices (Union[IResolvable, Sequence[Union[IResolvable, InputDeviceSettingsProperty]], None]) – Settings that apply only if the input is an Elemental Link input.

  • input_security_groups (Optional[Sequence[str]]) – The list of input security groups (referenced by IDs) to attach to the input if the input is a push type.

  • media_connect_flows (Union[IResolvable, Sequence[Union[IResolvable, MediaConnectFlowRequestProperty]], None]) – Settings that apply only if the input is a MediaConnect input.

  • name (Optional[str]) – A name for the input.

  • role_arn (Optional[str]) – The IAM role for MediaLive to assume when creating a MediaConnect input or Amazon VPC input. This doesn’t apply to other types of inputs. The role is identified by its ARN.

  • sources (Union[IResolvable, Sequence[Union[IResolvable, InputSourceRequestProperty]], None]) – Settings that apply only if the input is a pull type of input.

  • tags (Optional[Any]) – A collection of tags for this input. Each tag is a key-value pair.

  • type (Optional[str]) – The type for this input.

  • vpc (Union[IResolvable, InputVpcRequestProperty, None]) – Settings that apply only if the input is an push input where the source is on Amazon VPC.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}
Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

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).

Parameters
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::MediaLive::Input'
attr_arn

The ARN of the MediaLive input.

For example: arn:aws:medialive:us-west-1:111122223333:medialive:input:1234567. MediaLive creates this ARN when it creates the input.

CloudformationAttribute

Arn

Return type

str

attr_destinations

For a push input, the the destination or destinations for the input.

The destinations are the URLs of locations on MediaLive where the upstream system pushes the content to, for this input. MediaLive creates these addresses when it creates the input.

CloudformationAttribute

Destinations

Return type

List[str]

attr_sources

For a pull input, the source or sources for the input.

The sources are the URLs of locations on the upstream system where MediaLive pulls the content from, for this input. You included these URLs in the create request.

CloudformationAttribute

Sources

Return type

List[str]

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

Return type

List[str]

destinations

Settings that apply only if the input is a push type of input.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-destinations

Return type

Union[IResolvable, List[Union[IResolvable, InputDestinationRequestProperty]], None]

input_devices

Settings that apply only if the input is an Elemental Link input.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-inputdevices

Return type

Union[IResolvable, List[Union[IResolvable, InputDeviceSettingsProperty]], None]

input_security_groups

The list of input security groups (referenced by IDs) to attach to the input if the input is a push type.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-inputsecuritygroups

Return type

Optional[List[str]]

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Return type

str

Returns

the logical ID as a stringified token. This value will only get resolved during synthesis.

media_connect_flows

Settings that apply only if the input is a MediaConnect input.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-mediaconnectflows

Return type

Union[IResolvable, List[Union[IResolvable, MediaConnectFlowRequestProperty]], None]

name

A name for the input.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-name

Return type

Optional[str]

node

The construct tree node associated with this construct.

Return type

ConstructNode

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Return type

str

role_arn

The IAM role for MediaLive to assume when creating a MediaConnect input or Amazon VPC input.

This doesn’t apply to other types of inputs. The role is identified by its ARN.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-rolearn

Return type

Optional[str]

sources

Settings that apply only if the input is a pull type of input.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-sources

Return type

Union[IResolvable, List[Union[IResolvable, InputSourceRequestProperty]], None]

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

tags

A collection of tags for this input.

Each tag is a key-value pair.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-tags

Return type

TagManager

type

The type for this input.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-type

Return type

Optional[str]

vpc

Settings that apply only if the input is an push input where the source is on Amazon VPC.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#cfn-medialive-input-vpc

Return type

Union[IResolvable, InputVpcRequestProperty, None]

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

Return type

bool

Returns

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

InputDestinationRequestProperty

class CfnInput.InputDestinationRequestProperty(*, stream_name=None)

Bases: object

Settings that apply only if the input is a push type of input.

The parent of this entity is Input.

Parameters

stream_name (Optional[str]) – The stream name (application name/application instance) for the location the RTMP source content will be pushed to in MediaLive.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputdestinationrequest.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive as medialive

input_destination_request_property = medialive.CfnInput.InputDestinationRequestProperty(
    stream_name="streamName"
)

Attributes

stream_name

The stream name (application name/application instance) for the location the RTMP source content will be pushed to in MediaLive.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputdestinationrequest.html#cfn-medialive-input-inputdestinationrequest-streamname

Return type

Optional[str]

InputDeviceRequestProperty

class CfnInput.InputDeviceRequestProperty(*, id=None)

Bases: object

This entity is not used.

Ignore it.

Parameters

id (Optional[str]) – This property is not used. Ignore it.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputdevicerequest.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive as medialive

input_device_request_property = medialive.CfnInput.InputDeviceRequestProperty(
    id="id"
)

Attributes

id

This property is not used.

Ignore it.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputdevicerequest.html#cfn-medialive-input-inputdevicerequest-id

Return type

Optional[str]

InputDeviceSettingsProperty

class CfnInput.InputDeviceSettingsProperty(*, id=None)

Bases: object

Settings that apply only if the input is an Elemental Link input.

The parent of this entity is Input.

Parameters

id (Optional[str]) – The unique ID for the device.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputdevicesettings.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive as medialive

input_device_settings_property = medialive.CfnInput.InputDeviceSettingsProperty(
    id="id"
)

Attributes

id

The unique ID for the device.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputdevicesettings.html#cfn-medialive-input-inputdevicesettings-id

Return type

Optional[str]

InputSourceRequestProperty

class CfnInput.InputSourceRequestProperty(*, password_param=None, url=None, username=None)

Bases: object

Settings that apply only if the input is a pull type of input.

The parent of this entity is Input.

Parameters
  • password_param (Optional[str]) – The password parameter that holds the password for accessing the upstream system. The password parameter applies only if the upstream system requires credentials.

  • url (Optional[str]) – For a pull input, the URL where MediaLive pulls the source content from.

  • username (Optional[str]) – The user name to connect to the upstream system. The user name applies only if the upstream system requires credentials.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputsourcerequest.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive as medialive

input_source_request_property = medialive.CfnInput.InputSourceRequestProperty(
    password_param="passwordParam",
    url="url",
    username="username"
)

Attributes

password_param

The password parameter that holds the password for accessing the upstream system.

The password parameter applies only if the upstream system requires credentials.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputsourcerequest.html#cfn-medialive-input-inputsourcerequest-passwordparam

Return type

Optional[str]

url

For a pull input, the URL where MediaLive pulls the source content from.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputsourcerequest.html#cfn-medialive-input-inputsourcerequest-url

Return type

Optional[str]

username

The user name to connect to the upstream system.

The user name applies only if the upstream system requires credentials.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputsourcerequest.html#cfn-medialive-input-inputsourcerequest-username

Return type

Optional[str]

InputVpcRequestProperty

class CfnInput.InputVpcRequestProperty(*, security_group_ids=None, subnet_ids=None)

Bases: object

Settings that apply only if the input is an push input where the source is on Amazon VPC.

The parent of this entity is Input.

Parameters
  • security_group_ids (Optional[Sequence[str]]) – The list of up to five VPC security group IDs to attach to the input VPC network interfaces. The security groups require subnet IDs. If none are specified, MediaLive uses the VPC default security group.

  • subnet_ids (Optional[Sequence[str]]) – The list of two VPC subnet IDs from the same VPC. You must associate subnet IDs to two unique Availability Zones.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputvpcrequest.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive as medialive

input_vpc_request_property = medialive.CfnInput.InputVpcRequestProperty(
    security_group_ids=["securityGroupIds"],
    subnet_ids=["subnetIds"]
)

Attributes

security_group_ids

The list of up to five VPC security group IDs to attach to the input VPC network interfaces.

The security groups require subnet IDs. If none are specified, MediaLive uses the VPC default security group.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputvpcrequest.html#cfn-medialive-input-inputvpcrequest-securitygroupids

Return type

Optional[List[str]]

subnet_ids

The list of two VPC subnet IDs from the same VPC.

You must associate subnet IDs to two unique Availability Zones.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-inputvpcrequest.html#cfn-medialive-input-inputvpcrequest-subnetids

Return type

Optional[List[str]]

MediaConnectFlowRequestProperty

class CfnInput.MediaConnectFlowRequestProperty(*, flow_arn=None)

Bases: object

Settings that apply only if the input is a MediaConnect input.

The parent of this entity is Input.

Parameters

flow_arn (Optional[str]) – The ARN of one or two MediaConnect flows that are the sources for this MediaConnect input.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-mediaconnectflowrequest.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive as medialive

media_connect_flow_request_property = medialive.CfnInput.MediaConnectFlowRequestProperty(
    flow_arn="flowArn"
)

Attributes

flow_arn

The ARN of one or two MediaConnect flows that are the sources for this MediaConnect input.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-medialive-input-mediaconnectflowrequest.html#cfn-medialive-input-mediaconnectflowrequest-flowarn

Return type

Optional[str]