ModifyCasterVideoResource

Updated at:

Modifies the video resources of a production studio.

Operation description

You must call the CreateCaster operation to create a production studio before you call this operation to modify the video resources of the production studio.

QPS limit

The QPS limit for a single user is 10 queries per second. If the number of queries per second exceeds the limit, throttling is triggered, which may affect your business. Exercise caution when calling this operation.

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

update

*Caster

acs:live:*:{#accountId}:caster/{#CasterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-shanghai

CasterId

string

Yes

The ID of the production studio.

  • If you created the production studio by calling the CreateCaster operation, you can obtain the value from the CasterId parameter in the response.

  • If you created the production studio in the ApsaraVideo Live console, you can view the ID on the ApsaraVideo Live console > Production Studio > Cloud Production Studio page.

Note

The name of the production studio in the production studio list on the Cloud Production Studio page is the ID of the production studio.

LIVEPRODUCER_POST-cn-0pp1czt****

ResourceId

string

Yes

The ID of the resource. If you added the video source by calling the AddCasterVideoResource operation, you can obtain the value from the ResourceId parameter in the response.

05ab713c-676e-49c0-96ce-cc408da1****

ResourceName

string

No

The name of the video source.

test001

LiveStreamUrl

string

No

The streaming URL.

Important This parameter is active and required only when the video source type is a live stream.

rtmp://guide.aliyundoc.com/caster/4a82a3d1b7f0462ea37348366201****?auth_key=1608953344-0-0-ac8c628078541d7055a170ec59a5****

MaterialId

string

No

The ID of the material.

f080575eb5f4427684fc0715159a****

VodUrl

string

No

The URL of the video-on-demand (VOD) file.

Important This parameter is available only when the video source type is a video file and the video file is not imported into the media asset library.

Note

Only VOD files in MP4, FLV, and TS formats are supported.

http://developer.aliyundoc.com/AppName/StreamName.flv

BeginOffset

integer

No

The start offset of the video file. Unit: milliseconds.

Important This parameter takes effect only when the video source type is a video file.
Note

A value greater than 0 indicates that the start position for reading is the offset time relative to the first frame.

0

EndOffset

integer

No

The end offset. This parameter takes effect only for video files. Unit: milliseconds.

  • A value greater than 0 indicates that the end position for reading is the offset time relative to the first frame.

  • A value less than 0 indicates that the end position for reading is the offset time relative to the last frame.

10000

RepeatNum

integer

No

The number of times the video file is replayed after playback is complete. This parameter takes effect only for video files.

  • 0 (default): The video file is not replayed.

  • -1: The video file is replayed in an infinite loop.

0

PtsCallbackInterval

integer

No

The Presentation Time Stamp (PTS) callback interval. Unit: milliseconds. This parameter takes effect only for VOD materials.

2000

ImageId

string

No

The ID of the image material in the media asset library.

Note

This parameter is available and required only when the video source type is an image.

a089175eb5f4427684fc0715159a****

ImageUrl

string

No

The URL of the image material.

Note

This parameter is available only when the video source type is an image and the image file is not imported into the media asset library. You can upload images in JPG or PNG format. The maximum file size is 10 MB.

http://learn.aliyundoc.com/AppName/image.jpg

Response elements

Element

Type

Description

Example

object

CasterId

string

The ID of the production studio. You can use this ID as a request parameter to query the video sources of the production studio, add a layout to the production studio, or query the layouts of the production studio.

LIVEPRODUCER_POST-cn-0pp1czt****

RequestId

string

The request ID.

CF60DB6A-7FD6-426E-9288-122CC1A52FA7

ResourceId

string

The ID of the resource.

98461064-1c94-4dc1-85ce-94098764****

Examples

Success response

JSON format

{
  "CasterId": "LIVEPRODUCER_POST-cn-0pp1czt****",
  "RequestId": "CF60DB6A-7FD6-426E-9288-122CC1A52FA7",
  "ResourceId": "98461064-1c94-4dc1-85ce-94098764****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidCasterId.Malformed %s, please check and try again later. The parameter CasterId is invalid, please check and try again.
400 InvalidUserId.Malformed %s, please check userId. The userId passed in is invalid, please check.
400 InvalidParameter.Malformed There are invalid parameters: %s. There are invalid parameters: %s.
400 InvalidResourceId.Malformed %s, please check and try again later. The parameter ResourceId is invalid, please check and try again.
400 InvalidLiveStreamUrl.Malformed %s, please check and try again later. The parameter LiveStreamUrl is invalid, please check and try again.
400 InvalidMaterialId.Malformed %s, please check and try again later. The parameter MaterialId is invalid, please check and try again.
400 InvalidVodUrl.Malformed %s, please check and try again later. Parameter VodUrl is invalid, please check and try again.
401 IllegalOperation %s, please check and try again later. Operation not allowed, please check and try again.
500 InternalError %s, please try again later. Internal error, please try again later.
404 InvalidCaster.NotFound %s, please check and try again later. The guide station does not exist, please check and try again.
404 InvalidResource.NotFound %s, please check and try again later. The resource does not exist. Please check and try again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.