MediaConnect.Client.
create_flow
(**kwargs)¶Creates a new flow. The request must include one source. The request optionally can include outputs (up to 50) and entitlements (up to 50).
See also: AWS API Documentation
Request Syntax
response = client.create_flow(
AvailabilityZone='string',
Entitlements=[
{
'DataTransferSubscriberFeePercent': 123,
'Description': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'ConstantInitializationVector': 'string',
'DeviceId': 'string',
'KeyType': 'speke'|'static-key'|'srt-password',
'Region': 'string',
'ResourceId': 'string',
'RoleArn': 'string',
'SecretArn': 'string',
'Url': 'string'
},
'EntitlementStatus': 'ENABLED'|'DISABLED',
'Name': 'string',
'Subscribers': [
'string',
]
},
],
MediaStreams=[
{
'Attributes': {
'Fmtp': {
'ChannelOrder': 'string',
'Colorimetry': 'BT601'|'BT709'|'BT2020'|'BT2100'|'ST2065-1'|'ST2065-3'|'XYZ',
'ExactFramerate': 'string',
'Par': 'string',
'Range': 'NARROW'|'FULL'|'FULLPROTECT',
'ScanMode': 'progressive'|'interlace'|'progressive-segmented-frame',
'Tcs': 'SDR'|'PQ'|'HLG'|'LINEAR'|'BT2100LINPQ'|'BT2100LINHLG'|'ST2065-1'|'ST428-1'|'DENSITY'
},
'Lang': 'string'
},
'ClockRate': 123,
'Description': 'string',
'MediaStreamId': 123,
'MediaStreamName': 'string',
'MediaStreamType': 'video'|'audio'|'ancillary-data',
'VideoFormat': 'string'
},
],
Name='string',
Outputs=[
{
'CidrAllowList': [
'string',
],
'Description': 'string',
'Destination': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'ConstantInitializationVector': 'string',
'DeviceId': 'string',
'KeyType': 'speke'|'static-key'|'srt-password',
'Region': 'string',
'ResourceId': 'string',
'RoleArn': 'string',
'SecretArn': 'string',
'Url': 'string'
},
'MaxLatency': 123,
'MediaStreamOutputConfigurations': [
{
'DestinationConfigurations': [
{
'DestinationIp': 'string',
'DestinationPort': 123,
'Interface': {
'Name': 'string'
}
},
],
'EncodingName': 'jxsv'|'raw'|'smpte291'|'pcm',
'EncodingParameters': {
'CompressionFactor': 123.0,
'EncoderProfile': 'main'|'high'
},
'MediaStreamName': 'string'
},
],
'MinLatency': 123,
'Name': 'string',
'Port': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp'|'zixi-pull'|'rist'|'st2110-jpegxs'|'cdi'|'srt-listener'|'srt-caller'|'fujitsu-qos',
'RemoteId': 'string',
'SenderControlPort': 123,
'SmoothingLatency': 123,
'StreamId': 'string',
'VpcInterfaceAttachment': {
'VpcInterfaceName': 'string'
}
},
],
Source={
'Decryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'ConstantInitializationVector': 'string',
'DeviceId': 'string',
'KeyType': 'speke'|'static-key'|'srt-password',
'Region': 'string',
'ResourceId': 'string',
'RoleArn': 'string',
'SecretArn': 'string',
'Url': 'string'
},
'Description': 'string',
'EntitlementArn': 'string',
'IngestPort': 123,
'MaxBitrate': 123,
'MaxLatency': 123,
'MaxSyncBuffer': 123,
'MediaStreamSourceConfigurations': [
{
'EncodingName': 'jxsv'|'raw'|'smpte291'|'pcm',
'InputConfigurations': [
{
'InputPort': 123,
'Interface': {
'Name': 'string'
}
},
],
'MediaStreamName': 'string'
},
],
'MinLatency': 123,
'Name': 'string',
'Protocol': 'zixi-push'|'rtp-fec'|'rtp'|'zixi-pull'|'rist'|'st2110-jpegxs'|'cdi'|'srt-listener'|'srt-caller'|'fujitsu-qos',
'SenderControlPort': 123,
'SenderIpAddress': 'string',
'SourceListenerAddress': 'string',
'SourceListenerPort': 123,
'StreamId': 'string',
'VpcInterfaceName': 'string',
'WhitelistCidr': 'string'
},
SourceFailoverConfig={
'FailoverMode': 'MERGE'|'FAILOVER',
'RecoveryWindow': 123,
'SourcePriority': {
'PrimarySource': 'string'
},
'State': 'ENABLED'|'DISABLED'
},
Sources=[
{
'Decryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'ConstantInitializationVector': 'string',
'DeviceId': 'string',
'KeyType': 'speke'|'static-key'|'srt-password',
'Region': 'string',
'ResourceId': 'string',
'RoleArn': 'string',
'SecretArn': 'string',
'Url': 'string'
},
'Description': 'string',
'EntitlementArn': 'string',
'IngestPort': 123,
'MaxBitrate': 123,
'MaxLatency': 123,
'MaxSyncBuffer': 123,
'MediaStreamSourceConfigurations': [
{
'EncodingName': 'jxsv'|'raw'|'smpte291'|'pcm',
'InputConfigurations': [
{
'InputPort': 123,
'Interface': {
'Name': 'string'
}
},
],
'MediaStreamName': 'string'
},
],
'MinLatency': 123,
'Name': 'string',
'Protocol': 'zixi-push'|'rtp-fec'|'rtp'|'zixi-pull'|'rist'|'st2110-jpegxs'|'cdi'|'srt-listener'|'srt-caller'|'fujitsu-qos',
'SenderControlPort': 123,
'SenderIpAddress': 'string',
'SourceListenerAddress': 'string',
'SourceListenerPort': 123,
'StreamId': 'string',
'VpcInterfaceName': 'string',
'WhitelistCidr': 'string'
},
],
VpcInterfaces=[
{
'Name': 'string',
'NetworkInterfaceType': 'ena'|'efa',
'RoleArn': 'string',
'SecurityGroupIds': [
'string',
],
'SubnetId': 'string'
},
],
Maintenance={
'MaintenanceDay': 'Monday'|'Tuesday'|'Wednesday'|'Thursday'|'Friday'|'Saturday'|'Sunday',
'MaintenanceStartHour': 'string'
}
)
The entitlements that you want to grant on a flow.
The media streams that you want to add to the flow. You can associate these media streams with sources and outputs on the flow.
The outputs that you want to add to this flow.
The settings for the source of the flow.
The settings for source failover.
The VPC interfaces you want on the flow.
Create maintenance setting for a flow
dict
Response Syntax
{
'Flow': {
'AvailabilityZone': 'string',
'Description': 'string',
'EgressIp': 'string',
'Entitlements': [
{
'DataTransferSubscriberFeePercent': 123,
'Description': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'ConstantInitializationVector': 'string',
'DeviceId': 'string',
'KeyType': 'speke'|'static-key'|'srt-password',
'Region': 'string',
'ResourceId': 'string',
'RoleArn': 'string',
'SecretArn': 'string',
'Url': 'string'
},
'EntitlementArn': 'string',
'EntitlementStatus': 'ENABLED'|'DISABLED',
'Name': 'string',
'Subscribers': [
'string',
]
},
],
'FlowArn': 'string',
'MediaStreams': [
{
'Attributes': {
'Fmtp': {
'ChannelOrder': 'string',
'Colorimetry': 'BT601'|'BT709'|'BT2020'|'BT2100'|'ST2065-1'|'ST2065-3'|'XYZ',
'ExactFramerate': 'string',
'Par': 'string',
'Range': 'NARROW'|'FULL'|'FULLPROTECT',
'ScanMode': 'progressive'|'interlace'|'progressive-segmented-frame',
'Tcs': 'SDR'|'PQ'|'HLG'|'LINEAR'|'BT2100LINPQ'|'BT2100LINHLG'|'ST2065-1'|'ST428-1'|'DENSITY'
},
'Lang': 'string'
},
'ClockRate': 123,
'Description': 'string',
'Fmt': 123,
'MediaStreamId': 123,
'MediaStreamName': 'string',
'MediaStreamType': 'video'|'audio'|'ancillary-data',
'VideoFormat': 'string'
},
],
'Name': 'string',
'Outputs': [
{
'DataTransferSubscriberFeePercent': 123,
'Description': 'string',
'Destination': 'string',
'Encryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'ConstantInitializationVector': 'string',
'DeviceId': 'string',
'KeyType': 'speke'|'static-key'|'srt-password',
'Region': 'string',
'ResourceId': 'string',
'RoleArn': 'string',
'SecretArn': 'string',
'Url': 'string'
},
'EntitlementArn': 'string',
'ListenerAddress': 'string',
'MediaLiveInputArn': 'string',
'MediaStreamOutputConfigurations': [
{
'DestinationConfigurations': [
{
'DestinationIp': 'string',
'DestinationPort': 123,
'Interface': {
'Name': 'string'
},
'OutboundIp': 'string'
},
],
'EncodingName': 'jxsv'|'raw'|'smpte291'|'pcm',
'EncodingParameters': {
'CompressionFactor': 123.0,
'EncoderProfile': 'main'|'high'
},
'MediaStreamName': 'string'
},
],
'Name': 'string',
'OutputArn': 'string',
'Port': 123,
'Transport': {
'CidrAllowList': [
'string',
],
'MaxBitrate': 123,
'MaxLatency': 123,
'MaxSyncBuffer': 123,
'MinLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp'|'zixi-pull'|'rist'|'st2110-jpegxs'|'cdi'|'srt-listener'|'srt-caller'|'fujitsu-qos',
'RemoteId': 'string',
'SenderControlPort': 123,
'SenderIpAddress': 'string',
'SmoothingLatency': 123,
'SourceListenerAddress': 'string',
'SourceListenerPort': 123,
'StreamId': 'string'
},
'VpcInterfaceAttachment': {
'VpcInterfaceName': 'string'
}
},
],
'Source': {
'DataTransferSubscriberFeePercent': 123,
'Decryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'ConstantInitializationVector': 'string',
'DeviceId': 'string',
'KeyType': 'speke'|'static-key'|'srt-password',
'Region': 'string',
'ResourceId': 'string',
'RoleArn': 'string',
'SecretArn': 'string',
'Url': 'string'
},
'Description': 'string',
'EntitlementArn': 'string',
'IngestIp': 'string',
'IngestPort': 123,
'MediaStreamSourceConfigurations': [
{
'EncodingName': 'jxsv'|'raw'|'smpte291'|'pcm',
'InputConfigurations': [
{
'InputIp': 'string',
'InputPort': 123,
'Interface': {
'Name': 'string'
}
},
],
'MediaStreamName': 'string'
},
],
'Name': 'string',
'SenderControlPort': 123,
'SenderIpAddress': 'string',
'SourceArn': 'string',
'Transport': {
'CidrAllowList': [
'string',
],
'MaxBitrate': 123,
'MaxLatency': 123,
'MaxSyncBuffer': 123,
'MinLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp'|'zixi-pull'|'rist'|'st2110-jpegxs'|'cdi'|'srt-listener'|'srt-caller'|'fujitsu-qos',
'RemoteId': 'string',
'SenderControlPort': 123,
'SenderIpAddress': 'string',
'SmoothingLatency': 123,
'SourceListenerAddress': 'string',
'SourceListenerPort': 123,
'StreamId': 'string'
},
'VpcInterfaceName': 'string',
'WhitelistCidr': 'string'
},
'SourceFailoverConfig': {
'FailoverMode': 'MERGE'|'FAILOVER',
'RecoveryWindow': 123,
'SourcePriority': {
'PrimarySource': 'string'
},
'State': 'ENABLED'|'DISABLED'
},
'Sources': [
{
'DataTransferSubscriberFeePercent': 123,
'Decryption': {
'Algorithm': 'aes128'|'aes192'|'aes256',
'ConstantInitializationVector': 'string',
'DeviceId': 'string',
'KeyType': 'speke'|'static-key'|'srt-password',
'Region': 'string',
'ResourceId': 'string',
'RoleArn': 'string',
'SecretArn': 'string',
'Url': 'string'
},
'Description': 'string',
'EntitlementArn': 'string',
'IngestIp': 'string',
'IngestPort': 123,
'MediaStreamSourceConfigurations': [
{
'EncodingName': 'jxsv'|'raw'|'smpte291'|'pcm',
'InputConfigurations': [
{
'InputIp': 'string',
'InputPort': 123,
'Interface': {
'Name': 'string'
}
},
],
'MediaStreamName': 'string'
},
],
'Name': 'string',
'SenderControlPort': 123,
'SenderIpAddress': 'string',
'SourceArn': 'string',
'Transport': {
'CidrAllowList': [
'string',
],
'MaxBitrate': 123,
'MaxLatency': 123,
'MaxSyncBuffer': 123,
'MinLatency': 123,
'Protocol': 'zixi-push'|'rtp-fec'|'rtp'|'zixi-pull'|'rist'|'st2110-jpegxs'|'cdi'|'srt-listener'|'srt-caller'|'fujitsu-qos',
'RemoteId': 'string',
'SenderControlPort': 123,
'SenderIpAddress': 'string',
'SmoothingLatency': 123,
'SourceListenerAddress': 'string',
'SourceListenerPort': 123,
'StreamId': 'string'
},
'VpcInterfaceName': 'string',
'WhitelistCidr': 'string'
},
],
'Status': 'STANDBY'|'ACTIVE'|'UPDATING'|'DELETING'|'STARTING'|'STOPPING'|'ERROR',
'VpcInterfaces': [
{
'Name': 'string',
'NetworkInterfaceIds': [
'string',
],
'NetworkInterfaceType': 'ena'|'efa',
'RoleArn': 'string',
'SecurityGroupIds': [
'string',
],
'SubnetId': 'string'
},
],
'Maintenance': {
'MaintenanceDay': 'Monday'|'Tuesday'|'Wednesday'|'Thursday'|'Friday'|'Saturday'|'Sunday',
'MaintenanceDeadline': 'string',
'MaintenanceScheduledDate': 'string',
'MaintenanceStartHour': 'string'
}
}
}
Response Structure
Exceptions
MediaConnect.Client.exceptions.CreateFlow420Exception
MediaConnect.Client.exceptions.BadRequestException
MediaConnect.Client.exceptions.InternalServerErrorException
MediaConnect.Client.exceptions.ForbiddenException
MediaConnect.Client.exceptions.ServiceUnavailableException
MediaConnect.Client.exceptions.TooManyRequestsException