Configures stream-level region blocking.
Usage notes
You can configure up to 200 stream-level region blocking rules for a domain name. If there are rules in which the same application name and the same stream name are specified, the rule that is updated the most recently takes effect.
QPS limit
You can call this operation up to 50 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. For more information, see QPS limit on an API operation in ApsaraVideo Live.
Request parameters
Parameter | Type | Required | Description |
Action | String | Yes | The operation that you want to perform. Set the value to SetLiveStreamBlock. |
DomainName | String | Yes | The streaming domain. |
AppName | String | Yes | The name of the application to which the live stream belongs. |
StreamName | String | Yes | The name of the live stream. |
BlockType | String | Yes | The blocking type. Valid values: blacklist and whitelist. |
LocationList | String | Yes | The blocked region. If you specify multiple regions, such as CN and AS, separate them with commas (,). |
ReleaseTime | String | No | The time when the blocking ends. The time must be in UTC. If you do not specify this parameter, the blocking is valid for 7 days by default. |
Response parameters
Parameter | Type | Description |
RequestId | String | The request ID. |
Status | String | The status. A value of ok indicates that the request was successful. A value of fail indicates that the request failed. |
Description | String | The description about the request. If the request was successful, ok is returned. If the request failed, the failure detail is returned. |
Special error codes
Error code | Error message | HTTP status code | Description |
InternalError | The request processing has failed due to some unknown error. | 500 | The error message returned because an unknown error occurred. |
InvalidDomain.NotFound | The domain provided does not exist in our records. | 404 | The error message returned because the domain name is not found within your Alibaba Cloud account. |
InvalidParam | Parameter invalid. | 400 | The error message returned because one or more parameters are invalid. |
Examples
Sample request
https://live.aliyuncs.com?Action=SetLiveStreamBlock&DomainName=example.com&AppName=test&StreamName=test&LocationList=CN,AS&BlockType=whitelist&<Common request parameters>
Sample response
{
"RequestId": "0D70427D-91E4-4349-AAD3-5511A5BB823B",
"Status": "ok",
"Description": "ok"
}