Adds an input to a MediaConnect Flow instance.
Operation description
If the specified flow instance ID does not exist, the API returns an error.
By default, a flow instance supports only one input. After you enable dual-stream disaster recovery, you can add a second input.
Input type descriptions
RTMP-PUSH: Creates an RTMP listener input. You can push your stream to the URL returned by the API using the RTMP protocol.
RTMP-PULL: Creates an RTMP origin fetch input. The flow instance pulls an RTMP live stream from your specified origin server.
SRT-Listener: Creates an SRT listener input. You can push your stream to the URL returned by the API using the SRT protocol.
SRT-Caller: Creates an SRT origin fetch input. The flow instance pulls an SRT live stream from your specified origin server.
Flow: Uses the output of another upstream flow instance as the input. You must specify both the upstream flow instance ID and the output name. The output of the upstream flow instance must be of the SRT-Listener or RTMP-PULL type. When flow instances cascade, they use a leased line by default. This supports cross-region distribution across multiple flow instances.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ice:AddMediaConnectFlowInput |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FlowId |
string |
Yes |
Flow instance ID |
34900dc6-90ec-4968-af3c-fcd87f231a5f |
| InputProtocol |
string |
Yes |
Input type Valid values:
|
RTMP-PUSH |
| InputName |
string |
Yes |
Input name |
AliTestInput |
| MaxBitrate |
integer |
No |
Maximum bitrate in bits per second (bps) |
2000000 |
| Cidrs |
string |
No |
IP address whitelist in CIDR notation. Separate multiple CIDR blocks with commas. |
19.168.1.1/32,18.168.1.1/16 |
| InputFromUrl |
string |
No |
Input URL. Required only when the input type is RTMP-PULL or SRT-Listener. |
rtmp://pull.test.alivecdn.com/live/alitest |
| PairFlowId |
string |
No |
Upstream Flow ID. Required only when the input type is Flow. |
805fbdd0-575e-4146-b35d-ec7f63937b20 |
| PairOutputName |
string |
No |
Upstream Flow output name. Required only when the input type is Flow. |
AliTestOutput |
| SrtLatency |
integer |
No |
SRT latency in milliseconds. Required only when the input type is SRT-Listener or SRT-Caller. |
1000 |
| SrtPassphrase |
string |
No |
SRT encryption key. Required only when the input type is SRT-Listener or SRT-Caller. |
BETTERG08S01 |
| SrtPbkeyLen |
string |
No |
SRT encryption key length in bytes. Required only when the input type is SRT-Listener or SRT-Caller. Valid values:
|
32 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response body |
||
| Content |
object |
Response body |
|
| InputUrl |
string |
Input URL |
rtmp://1.2.3.4:1935/live/AliTestInput_8666ec062190f00e263012666319a5be |
| InnerInputUrl |
string |
||
| Description |
string |
API call description |
OK |
| RetCode |
integer |
Error code. A value of 0 indicates success. |
0 |
| RequestId |
string |
Request ID |
11357BE8-4C54-58EA-890A-5AB646EDE4B2 |
Examples
Success response
JSON format
{
"Content": {
"InputUrl": "rtmp://1.2.3.4:1935/live/AliTestInput_8666ec062190f00e263012666319a5be",
"InnerInputUrl": ""
},
"Description": "OK",
"RetCode": 0,
"RequestId": "11357BE8-4C54-58EA-890A-5AB646EDE4B2"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.