Disables a live stream.

Usage notes

You can call this operation to disable a live stream and specify the time when the live stream is resumed. If the time is not specified, you can call the ResumeLiveStream operation to resume the live stream. This operation supports only the live streams ingested by streamers.

Note You can disable up to 10,000 live streams. If the limit is reached, you cannot disable any more live streams. Pay attention to the number of live streams that are disabled. You can call the DescribeLiveStreamsBlockList operation to query the number of live streams that are disabled.

QPS limit

You can call this operation up to 20 times per second per account. Requests that exceed this limit are dropped and you may 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.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ForbidLiveStream

The operation that you want to perform. Set the value to ForbidLiveStream.

DomainName String Yes demo.aliyundoc.com

The ingest domain.

AppName String Yes liveApp****

The application to which the live stream belongs.

StreamName String Yes liveStream****

The name of the ingested live stream.

LiveStreamType String Yes publisher

Specifies whether the live stream is ingested by a streamer or played by a viewer. Set the value to publisher.

Oneshot String No yes

Specifies whether to disable the live stream without adding the ingest URL of the live stream to the blacklist. Valid values:

  • yes: disables the live stream but does not add the ingest URL of the live stream to the blacklist. This value is available only when the live stream is ingested or played in the upstream.
  • no: disables the live stream and adds the ingest URL of the live stream to the blacklist.
Note If you do not specify this parameter, the default value no is used.
ResumeTime String No 2015-12-01T10:37:00Z

The time when the live stream is resumed. Specify the time in the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time must be in UTC.

Note
  • If you set the Oneshot parameter to no and do not specify this parameter, the live stream is disabled for six months by default.
  • If you specify this parameter, the live stream is resumed at the specified point in time.

Response parameters

Parameter Type Example Description
RequestId String 16BFE188-B193-4C3C-ADC5-79A7E31486EA

The request ID.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=ForbidLiveStream
&DomainName=demo.aliyundoc.com
&AppName=liveApp****
&StreamName=liveStream****
&LiveStreamType=publisher
&<Common request parameters> HTTP/1.1

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ForbidLiveStreamResponse>
    <RequestId>16BFE188-B193-4C3C-ADC5-79A7E31486EA</RequestId>
</ForbidLiveStreamResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "16BFE188-B193-4C3C-ADC5-79A7E31486EA"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidResumeTime.Malformed Specified parameter ResumeTime is not valid. The error message returned because the value of the ResumeTime parameter is invalid. Specify a valid value.
400 QuotaExceeded.Blacklist Exceed max blacklist count limit The error message returned because the number of items in the blacklist exceeded the upper limit.
400 ConfigAlreadyExists Config has already exist. The error message returned because the configuration already exists.

For a list of error codes, see Service error codes.