SetLiveStreamPreloadTasks

更新时间:
复制 MD 格式

Sets live stream prefetch tasks. You can prefetch up to 100 live streams in a batch.

Operation description

  • You can call this operation to set live stream prefetch tasks in batches. You can set up to 100 live stream URLs at a time.

  • Live stream prefetch does not support HLS URLs.

QPS limit

The single-user QPS limit for this operation is 50 calls per second. If the limit is exceeded, API calls are throttled, which may affect your business. Call this operation as needed.

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:SetLiveStreamPreloadTasks

none

*Domain

acs:cdn:*:{#accountId}:domain/{#DomainName}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

DomainName

string

Yes

The streaming domain.

example.com

PlayUrl

string

Yes

The live stream URLs. You can specify multiple URLs separated by commas (,). A maximum of 100 URLs can be specified.

rtmp://guide.aliyundoc.com/liveApp****/liveStream****

Area

string

No

The prefetch area. Valid values:

  • domestic: the Chinese mainland.

  • overseas: outside the Chinese mainland, including Hong Kong (China), Macao (China), and Taiwan (China).

  • global: global acceleration.

If you do not specify this parameter, the default prefetch area is the acceleration region configured for your domain name.

Valid values:

  • domestic :

    The Chinese mainland.

  • global :

    Global acceleration.

  • overseas :

    Outside the Chinese mainland, including Hong Kong (China), Macao (China), and Taiwan (China).

domestic

PreloadedStartTime

string

No

The start time of the prefetch task in UTC. Example: 2016-06-29T19:00:00Z. If you do not specify this parameter, the default prefetch duration is 1 hour.

2016-06-29T19:00:00Z

PreloadedEndTime

string

No

The end time of the prefetch task in UTC. Example: 2016-06-30T19:00:00Z. The interval between EndTime and StartTime cannot exceed 6 hours.

2016-06-30T19:00:00Z

Response elements

Element

Type

Description

Example

object

FailedURL

integer

The number of URLs for which the prefetch task failed.

0

PreloadTasksMessages

object

PreloadTasksMessage

array<object>

The details of the live stream prefetch task.

object

The details of the live stream prefetch task.

Description

string

Indicates if the prefetch task for a URL was created. Valid values:

  • Successfully

  • InternalError

Successfully

PlayUrl

string

The live stream URL.

rtmp://guide.aliyundoc.com/liveApp****/liveStream****

TaskId

string

The task ID.

yourTaskId

RequestId

string

The request ID.

36E0E523-E0C6-5D95-A465-A8EA2DCBA2A5

Status

string

The task status. Valid values:

  • Success: successful.

  • Failed: failed.

Note

The status is Failed if any task fails to be created.

Success

SuccessURL

integer

The number of URLs for which the prefetch task succeeded.

1

TotalURL

integer

The total number of URLs in the prefetch task.

1

Examples

Success response

JSON format

{
  "FailedURL": 0,
  "PreloadTasksMessages": {
    "PreloadTasksMessage": [
      {
        "Description": "Successfully",
        "PlayUrl": "rtmp://guide.aliyundoc.com/liveApp****/liveStream****",
        "TaskId": "yourTaskId"
      }
    ]
  },
  "RequestId": "36E0E523-E0C6-5D95-A465-A8EA2DCBA2A5",
  "Status": "Success",
  "SuccessURL": 1,
  "TotalURL": 1
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParam Parameter invalid. Illegal input parameters
400 InvalidEndTime.Mismatch Specified end time does not match the specified start time.
400 Duration.Exceed Duration between StartTime and EndTime is too long.
400 QuotaExceeded.PreloadTaskslimit Exceed max task count limit
400 NoSpecialConfiguration no special configuration for domain name.
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.