Configures snapshot settings for a streaming domain.
Usage note
The Object Storage Service (OSS) bucket must reside in the same region as the live center that you select when you add the domain. Cross-region snapshot capture is not supported.
QPS limit
A single user can perform a maximum of 30 queries per second (QPS). Throttling is triggered when the number of calls per second exceeds the QPS limit. The throttling may affect your business. Thus, we recommend that you observe the QPS limit on this operation. For more information about what a single user means and the QPS details, see QPS limit on an API operation in ApsaraVideo Live.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddLiveAppSnapshotConfig |
The operation that you want to perform. Set the value to AddLiveAppSnapshotConfig. |
AppName | String | Yes | liveApp |
The name of the application to which the live stream belongs. |
DomainName | String | Yes | example.com |
The main streaming domain. |
OssBucket | String | Yes | liveBucket**** |
The name of the OSS bucket in which the snapshots are stored. |
OssEndpoint | String | Yes | oss-cn-shanghai.aliyuncs.com |
The endpoint of OSS. |
TimeInterval | Integer | Yes | 5 |
The intervals at which the snapshots are captured. Unit: seconds. Valid values: 5 to 3600. |
OverwriteOssObject | String | No | {AppName}/{StreamName}.jpg |
The name of the OSS object, which is to be overwritten each time when a snapshot is captured.
|
SequenceOssObject | String | No | snapshot/{AppName}/{StreamName}/{UnixTimestamp}.jpg |
The name of the OSS object, which increments each time when a snapshot is captured. You can call the DescribeLiveStreamSnapshotInfo operation to query OSS objects of a specified period.
|
Callback | String | No | https://learn.aliyundoc.com |
The URL that is used to receive callback notifications about snapshot capturing. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
The ID of the request. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=AddLiveAppSnapshotConfig
&AppName=liveApp****
&DomainName=example.com
&OssBucket=liveBucket****
&OssEndpoint=oss-cn-shanghai.aliyuncs.com
&TimeInterval=5
&<Common request parameters>
Sample success responses
XML
format
<AddLiveAppSnapshotConfigResponse>
<RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
</AddLiveAppSnapshotConfigResponse>
JSON
format
{
"RequestId":"16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error code
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidOverwriteOssObjectOrSequenceOssObject.Malformed | Specified paramters OverwriteOssObject or SequenceOssObject should have one. | The error message returned because neither the OverwriteOssObject parameter nor the SequenceOssObject parameter was specified. |
400 | InvalidOssBucket.Malformed | Specified parameter OssBucket is not valid. | The error message returned because the format of the OSS bucket name is invalid. Check whether the value of the OssBucket parameter is valid. |
400 | InvalidOssEndpoint.Malformed | Specified parameter OssEndpoint is not valid. | The error message returned because the format of the OSS endpoint is invalid. Check whether the value of the OssEndpoint parameter is valid. |
400 | InvalidOverwriteOssObject.Malformed | Specified parameter OverwriteOssObject is not valid. | The error message returned because the format of the specified OSS object name is invalid. Check whether the value of the OverwriteOssObject parameter is valid. |
400 | InvalidSequenceOssObject.Malformed | Specified parameter SequenceOssObject is not valid. | The error message returned because the format of the specified OSS object name is invalid. Check whether the value of the SequenceOssObject parameter is valid. |
400 | InvalidOssBucket.NotFound | The parameter OssBucket does not exist. | The error message returned because the format of the OSS bucket name is invalid. Check whether the value of the OssBucket parameter is valid. |
400 | ConfigAlreadyExists | Config has already exist. | The error message returned because an existing snapshot configuration is found. |
For a list of error codes, visit the API Error Center.