tencent cloud

文档反馈

CreateStreamLinkFlow

最后更新时间:2024-09-09 10:35:22

    1. API Description

    Domain name for API request: mdc.tencentcloudapi.com.

    This API is used to create a StreamLink flow.

    A maximum of 20 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

    Parameter Name Required Type Description
    Action Yes String Common Params. The value used for this API: CreateStreamLinkFlow.
    Version Yes String Common Params. The value used for this API: 2020-08-28.
    Region No String Common Params. This parameter is not required for this API.
    FlowName Yes String Flow name
    MaxBandwidth Yes Integer Maximum bandwidth in bps. Valid values: 10000000, 20000000, 50000000
    InputGroup.N No Array of CreateInput Flow input group
    EventId No String The media transmission event ID associated with the Flow. Each flow can only be associated with one event.

    3. Output Parameters

    Parameter Name Type Description
    Info DescribeFlow Information of the created flow
    RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

    4. Example

    Example1 Sample request

    Input Example

    POST / HTTP/1.1
    Host: mdc.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: CreateStreamLinkFlow
    <Common request parameters>
    
    {
        "FlowName": "aaa",
        "MaxBandwidth": 20000000,
        "InputGroup": [
            {
                "InputName": "inputname",
                "Description": "inputnameDescription",
                "Protocol": "RTP",
                "AllowIpList": [
                    "0.0.0.0/0"
                ],
                "SRTSettings": {
                    "StreamId": "#!::u=johnny,t=file,m=publish,r=results.csv",
                    "Latency": 1000,
                    "RecvLatency": 1000,
                    "PeerLatency": 1000,
                    "PeerIdleTimeout": 1000,
                    "Passphrase": "aaa",
                    "PbKeyLen": 10
                },
                "RTPSettings": {
                    "FEC": "none",
                    "IdleTimeout": 1000
                }
            }
        ]
    }
    

    Output Example

    {
        "Response": {
            "Info": {
                "FlowId": "01742ac4e2b90956b92d573b0443",
                "FlowName": "aaa",
                "State": "IDLE",
                "MaxBandwidth": 0,
                "InputGroup": [
                    {
                        "InputId": "01742ac4e2b90956b92d573b0444",
                        "InputName": "inputname",
                        "Description": "inputname Description",
                        "Protocol": "RTP",
                        "InputRegion": "xx",
                        "AllowIpList": [
                            "0.0.0.0/0"
                        ],
                        "InputAddressList": [
                            {
                                "Ip": "0.0.0.0",
                                "Port": 0
                            }
                        ],
                        "SRTSettings": {
                            "Latency": 0,
                            "RecvLatency": 0,
                            "PeerLatency": 0,
                            "PeerIdleTimeout": 0,
                            "Passphrase": ""
                        },
                        "RTPSettings": {
                            "FEC": "none",
                            "IdleTimeout": 1000
                        },
                        "RTMPSettings": {
                            "StreamKey": "",
                            "AppName": "1111"
                        }
                    }
                ],
                "OutputGroup": []
            },
            "RequestId": "aaaaa"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InternalError Internal error.
    InvalidParameter Invalid parameter.
    InvalidParameter.ExceededQuantityLimit The quantity exceeds the limit.
    InvalidParameter.Input Invalid input.
    InvalidParameter.MaxBandwidth Invalid maximum bandwidth value.
    InvalidParameter.Name Invalid Name.