CreateCaster

更新时间:
复制 MD 格式

Call the CreateCaster operation to create a production studio.

Operation description

You must activate ApsaraVideo Live before you call this operation. For more information, see Activate ApsaraVideo Live. This operation supports the following types of production studios: Standard, Lightweight Carousel, Virtual Studio, and New Playlist (Carousel).

QPS limit

The queries per second (QPS) limit for this operation is 10 calls per second for each user. If you exceed this limit, API calls are throttled, which may affect your business. We recommend that you call this operation at a reasonable rate.

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

create

*Caster

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

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

cn-beijing

CasterName

string

No

The name of the production studio.

liveCaster****

ClientToken

string

Yes

The client token that is used to ensure the idempotence of the request.

Generate a token on your client and ensure that the token is unique among different requests. The token can be up to 64 ASCII characters in length.

53200b81-b761-4c10-842a-a0726d97****

NormType

integer

Yes

The type of the production studio. Valid values:

  • 1: Standard.

  • 3: Lightweight Carousel.

  • 4: Virtual Studio.

  • 6: Carousel (New Playlist).

1

ChargeType

string

Yes

The billing method. Only PostPaid is supported. Valid values:

  • PrePaid: subscription (not supported).

  • PostPaid: pay-as-you-go.

PostPaid

PurchaseTime

string

No

The purchase time of the production studio. The time is in the `yyyy-MM-ddTHH:mm:ssZ` format and is displayed in UTC.

Note

This parameter is available only if you set ChargeType to PrePaid.

2017-08-20T12:10:10Z

ExpireTime

string

No

The expiration time of the production studio. The time is in the `yyyy-MM-ddTHH:mm:ssZ` format and is displayed in UTC.

Note

This parameter is available only if you set ChargeType to PrePaid.

2017-08-22T12:10:10Z

CasterTemplate

string

No

The preset resolution of the production studio. This parameter is available only for the subscription billing method. Valid values:

  • lp_ld: low definition.

  • lp_sd: standard definition.

  • lp_hd: high definition.

  • lp_ud: ultra-high definition.

  • lp_ld_v: vertical low definition.

  • lp_sd_v: vertical standard definition.

  • lp_hd_v: vertical high definition.

  • lp_ud_v: vertical ultra-high definition.

Note

If you use the pay-as-you-go billing method, call the SetCasterConfig operation to set the resolution.

lp_sd

ResourceGroupId

string

No

The ID of the resource group. For more information, see What is a resource group?.

rg-aekzw******

Tag

array<object>

No

The tags.

object

No

The tags.

Key

string

No

The tag key.

TestKey

Value

string

No

The tag value.

TestValue

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 stream URLs, start the production studio, add video resources, add layouts, query the layout list, add components, and add playlists.

a2b8e671-2fe5-4642-a2ec-bf93880e****

RequestId

string

The request ID.

16A96B9A-F203-4EC5-8E43-CB92E68F****

Examples

Success response

JSON format

{
  "CasterId": "a2b8e671-2fe5-4642-a2ec-bf93880e****",
  "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter.PurchaseTime %s, please check and try again later. The parameter PurchaseTime is invalid, please check and try again.
400 InvalidParameter.ExpireTime %s, please check and try again later. The parameter ExpireTime is invalid, please check and try again.
400 MissingParameter %s. Missing parameter
400 InvalidChargeType.Malformed %s, please check and try again later. The parameter ChargeType is invalid, please check and try again.
400 InvalidChargeType.PostSupport %s, please check and try again later. ChargeType only supports post-paid, please check and try again.
400 InvalidCasterTemplate.Malformed %s, please check and try again later. The parameter CasterTemplate is invalid, please check and try again.
400 InvalidParameter.Malformed There are invalid parameters: %s. There are invalid parameters: %s.
400 InvalidParameter.ChargeType %s, please check and try again later. The parameter ChargeType is invalid, please check and try again.
400 InvalidPeriod.Malformed %s, please check and try again later. Invalid time interval, please check and try again.
400 InvalidUserId.Malformed %s, please check userId. The userId passed in is invalid, please check.
400 InvalidClientToken.Malformed %s, please check and try again later. The parameter ClientToken is invalid, please check and try again.
400 IncorrectCasterStatus %s, please check and try again later. Guide station status error, please check and try again.
401 CasterNumberExceed %s, please check and try again later. The number of casters exceeds the limit. Please check and try again.
403 PermissionDenied %s, please check and try again later. Access denied, please check and try again.
404 InvalidParameter.NormType %s, please check and try again later. The parameter NormType is invalid, please check and try again.
404 InvalidConfiguration.NotFound %s, please check and try again later. Configuration does not exist, please check and try again.
408 CreateCaster.Timeout %s, please try again later. Call CreateCaster timed out, please try again later.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.