All Products
Search
Document Center

ApsaraVideo Live:CreateCaster

Last Updated:Nov 14, 2024

Creates a production studio.

Operation description

You must enable the production studio feature before you can call this operation to create a production studio. For more information, see Enable the production studio feature.

You can call this operation to create production studios in general mode or playlist mode. Production studios in playlist mode can be used for carousel playback.

QPS limit

You can call this operation up to 10 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
live:CreateCastercreate
*Caster
acs:live:*:{#accountId}:caster/{#CasterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
CasterNamestringNo

The name of the production studio.

liveCaster****
ClientTokenstringYes

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

You can specify a custom value for this parameter, but you must make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

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

The type of the production studio. Valid values:

  • 1: general mode
  • 6: playlist mode (for carousel playback)
1
ChargeTypestringYes

The billing method. Only the pay-as-you-go billing method is supported.**** Valid values:

  • PrePaid: subscription. This billing method is not yet supported.
  • PostPaid: pay-as-you-go
PostPaid
PurchaseTimestringNo

The time when the production studio was purchased. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note This parameter is valid only if you set the ChargeType parameter to PrePaid.
2017-08-20T12:10:10Z
ExpireTimestringNo

The expiration time of the production studio. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note This parameter is valid only if you set the ChargeType parameter to PrePaid.
2017-08-22T12:10:10Z
CasterTemplatestringNo

The preset resolution of the production studio. If the subscription billing method is used, this parameter supports the following valid values:

  • lp_ld: low definition
  • lp_sd: standard definition
  • lp_hd: high definition
  • lp_ud: ultra high definition
  • lp_ld_v: low definition (portrait mode)
  • lp_sd_v: standard definition (portrait mode)
  • lp_hd_v: high definition (portrait mode)
  • lp_ud_v: ultra high definition (portrait mode)
Note If the pay-as-you-go billing method is used, you must call the SetCasterConfig operation to specify the resolution.
lp_sd
ResourceGroupIdstringNo

The ID of the resource group. For more information about resource groups, see Resource groups.

rg-aekzw******
Tagarray<object>No

The tags.

objectNo

The tag.

KeystringNo

The key of the tag.

TestKey
ValuestringNo

The value of the tag.

TestValue

Response parameters

ParameterTypeDescriptionExample
object
CasterIdstring

The ID of the production studio. You can specify the ID in a request to query the streaming URLs of the production studio, start the production studio, add a video resource, a layout, a component, or a playlist to the production studio, or query layouts of the production studio.

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

The request ID.

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

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
400InvalidParameter.PurchaseTime%s
400InvalidParameter.ExpireTime%s
400MissingParameter%s
400InvalidChargeType.Malformed%s
400InvalidChargeType.PostSupport%s
400InvalidCasterTemplate.Malformed%s
400InvalidParameter.Malformed%s
400InvalidParameter.ChargeType%s
400InvalidPeriod.Malformed%s
400InvalidUserId.Malformed%s
400InvalidClientToken.Malformed%s
400IncorrectCasterStatus%s
401CasterNumberExceed%s
403PermissionDenied%s
404InvalidParameter.NormType%s
404InvalidConfiguration.NotFound%s
408CreateCaster.Timeout%s

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-09-27The Error code has changed. The request parameters of the API has changedView Change Details
2024-08-21The Error code has changed. The request parameters of the API has changedView Change Details