All Products
Search
Document Center

:SetLiveEdgeTransfer

Dernière mise à jour :Jul 31, 2026

Calls SetLiveEdgeTransfer to configure live stream relay settings.

Operation description

The live edge stream relay configuration made by calling SetLiveEdgeTransfer only takes effect for streams that start after the configuration is completed. The following are examples of some typical scenarios:

ScenarioAnalysisResult
1. The user has already started streaming before calling SetLiveEdgeTransfer.The live edge stream relay configuration does not exist at this point.The stream is not affected by the SetLiveEdgeTransfer configuration, meaning live edge stream relay will not be initiated.
2. The user interrupts streaming that was started before calling SetLiveEdgeTransfer, and then resumes streaming.The live edge stream relay configuration already exists at this point.The resumed stream will initiate live stream relay according to the SetLiveEdgeTransfer configuration.
3. The user starts streaming after calling SetLiveEdgeTransfer.The live edge stream relay configuration already exists at this point.This stream will initiate live stream relay according to the SetLiveEdgeTransfer configuration.

QPS Limit

The single-user QPS limit for this API is 100 calls/second. Exceeding the limit will result in API throttling, which may affect your business. Please call this API appropriately.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

live:SetLiveEdgeTransfer

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

DomainName

string

Yes

The ingest domain name. Live stream relay is configured at the granularity of the ingest DomainName. Each domain can have only one live stream relay configuration.

demo.aliyundoc.com

AppName

string

No

The application name to which the live stream belongs. Regular expressions are supported for configuration with exceptions. For more information, see AppName and StreamName Parameter Configuration Instructions below. For example: liveApp****[1,2,3] indicates that the three apps liveApp1, liveApp2, and liveApp****3 are allowed for stream relay.

Note
  • This parameter only takes effect for the TargetDomainList in the request parameters.

  • When configuring the AppName parameter value using regular expressions, the ^ or $ characters cannot be used, otherwise stream relay will fail.

liveApp****

StreamName

string

No

The stream name. Regular expressions are supported for configuration with exceptions. For more information, see AppName and StreamName Parameter Configuration Instructions below. For example: liveStream****[1,2,3] indicates that the three streams liveStream1, liveStream2, and liveStream****3 are allowed for stream relay.

Note
  • This parameter only takes effect for the TargetDomainList in the request parameters.

  • When configuring the StreamName parameter value using regular expressions, the ^ or $ characters cannot be used, otherwise stream relay will fail.

liveStream****

TargetDomainList

string

No

The list of target domains specified by the user for stream relay. Multiple domains are separated by commas (,). The request must contain one of the TargetDomainList and HttpDns parameters, and the two are mutually exclusive.

Note
  • When TargetDomainList is set in the request parameters, the AppName and StreamName parameters take effect.

  • When TargetDomainList is set in the request parameters, the HttpDns parameter cannot be set.

learn.aliyundoc.com,guide.aliyundoc.com

HttpDns

string

No

The HTTPDNS interface for obtaining the stream relay target address. The request must contain one of the TargetDomainList and HttpDns parameters, and the two are mutually exclusive.

Note

If HttpDns is set in the request parameters, the TargetDomainList parameter cannot be set, and the AppName and StreamName restrictions do not take effect.

Live stream relay has requirements for the message structure returned by the HTTPDNS interface. For more information, see HTTPDNS Instructions below.

http://developer.aliyundoc.com

TransferArgs

string

No

Specifies whether to pass through ingest parameters. Valid values:

  • yes: Ingest parameters are passed through.

  • no (default): Ingest parameters are not passed through.

Valid values:

  • no :

    Ingest parameters are not passed through

  • yes :

    Ingest parameters are passed through

yes

AppName and StreamName Parameter Configuration Instructions

Neither AppName nor StreamName supports ^ or $ matching. If either value contains ^ or $, stream relay will fail.

HTTPDNS Instructions

If HttpDns is set in the request parameters of SetLiveEdgeTransfer, live stream relay will access the HTTPDNS interface set through HttpDns to obtain the stream relay target address.

Request example: http://developer.aliyundoc.com/?host={}&app={}&name={}{<_ali_user_args>} Note: When actually requesting the HTTPDNS interface, the following parameters will be replaced with information from the ingest URL:

  • {}: The ingest domain name.

  • {}: The application name to which the live stream belongs.

  • {}: The stream name.

  • {<_ali_user_args>}: The parameters carried by the user's ingest stream.

The requirements for the interface return code and return data for live stream relay are as follows:

  • A return code of 403 indicates access failure, and stream relay is not required.

  • A return code of 200 indicates successful access, and the result is returned in JSON format. The structure and parameter examples are as follows:

{
    "cdn_types": [
        {
            "name": "cdnA****",
            "upstream_url": "rtmp://developer.aliyundoc.com/live/testedge****"
        },
        {
            "name": "cdnB****",
            "upstream_url": "rtmp://developer.aliyundoc.com/live/testedge****"
        }
    ]
}
ParameterDescriptionExample
nameThe CDN name. It can be customized but must not be duplicated.cdnA****
upstream_urlThe ingest address to relay to.rtmp://developer.aliyundoc.com/live/testedge****
Note

The relay domains are obtained from the returned JSON result. If multiple relay domains are returned, it means the original stream needs to be pushed to multiple destinations.

  • If the returned data structure does not meet the requirements, stream relay will fail.

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68F4CF8

Examples

Success response

JSON format

{
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CF8"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParam Parameter invalid. Illegal input parameters
500 InternalError The request processing has failed due to backend service exception.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.