Adds a watermark rule.

Usage notes

You can call this operation to add watermark rules for a watermark template that you create by calling the AddLiveStreamWatermark operation.

QPS limit

You can call this operation up to 60 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.

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 AddLiveStreamWatermarkRule

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

Name String Yes WatermarkRule****

The name of the custom rule.

Domain String Yes example.aliyundoc.com

The streaming domain.

App String Yes liveApp****

The name of the application to which the live stream belongs.

Stream String Yes liveStreamA

The name of the live stream. The following rules apply:

  • A stream name can be exactly matched. Example: liveStreamA.
  • Fuzzy match is also supported. The use of an asterisk (*) allows all approximate matches to be found.
  • You can place the asterisk before or after an approximate string.
Important
  • Fuzzy match: Only one asterisk (*) before or after an approximate string is allowed. The approximate string must be enclosed in (). Separate multiple strings with vertical bars (|).
  • For example, *(t1|t2) matches all streams whose name has the t1 or t2 suffix, and (abc|123)* matches all streams whose name has the abc or 123 prefix.
TemplateId String Yes 445409ec-7eaa-461d-8f29-4bec2eb9****

The ID of the watermark template.

Note You can obtain the template ID by checking the value of the TemplateId parameter that is returned by the AddLiveStreamWatermark operation.
Description String No my rule

The description of the custom rule.

Response parameters

Parameter Type Example Description
RuleId String 445409ec-7eaa-461d-8f29-4bec2eb9****

The ID of the watermark rule.

RequestId String 5c6a2a0df228-4a64-af62-20e91b9676b3

The ID of the request.

Examples

Sample request

http(s)://live.aliyuncs.com/?Action=AddLiveStreamWatermarkRule
&App=liveApp****
&Domain=example.aliyundoc.com
&Name=WatermarkRule****
&Stream=liveStreamA
&TemplateId=445409ec-7eaa-461d-8f29-4bec2eb9****
&<Common request parameters>

Sample success responses

XML format

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

<AddLiveStreamWatermarkRuleResponse>
<RequestId>5c6a2a0df228-4a64-af62-20e91b9676b3</RequestId>
<RuleId>445409ec-7eaa-461d-8f29-4bec2eb9****</RuleId>
</AddLiveStreamWatermarkRuleResponse>

JSON format

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

{
  "RequestId" : "5c6a2a0df228-4a64-af62-20e91b9676b3",
  "RuleId" : "445409ec-7eaa-461d-8f29-4bec2eb9****"
}

Error codes

For a list of error codes, visit the API Error Center.