edit-icon download-icon

AddWaterMarkTemplate

Last Updated: Feb 08, 2018

Description

The AddWaterMarkTemplate API creates a watermark template.

Request parameters

Parameter Type Required or not Description
Action String Yes API of the action, system required parameter. Set this parameter to AddWaterMarkTemplate.
Name String Yes Template name, up to 128 bytes.
Config String Yes Watermark template configurations, which is a JSON object. For details, see “5. WaterMarkConfig” in Parameters” of “Appendix.” Example:
{
"Width":"10",
"Height":"30",
"Dx":"10",
"Dy":"5",
"ReferPos":"TopRight",
"Type":"Image",
"Timeline":{"Start":"0", "Duration":"10"}
}

Return parameters

Name Type Description
WaterMarkTemplate AliyunWaterMarkTemplate Watermark template

Example

Return example

  1. http://mts.cn-hangzhou.aliyuncs.com/?Name=example-watermark&Config=%7B%22Width%22%3A%2210%22%2C%22Height%22%3A%2230%22%2C%22Dx%22%3A%2210%22%2C%0A%22Dy%22%3A%225%22%2C%22ReferencePos%22%3A%22TopRight%22%2C%0A%22Type%22%3A%22Image%22%7D%0A&Action=AddWaterMarkTemplate&<Public parameter>

Return example

XML

  1. <AddWaterMarkTemplateResponse>
  2. <RequestId>25818875-5F78-4A13-BEF6-D7393642CA58</RequestId>
  3. <WaterMarkTemplate>
  4. <Id>88c6ca184c0e47098a5b665e2a126797</Id>
  5. <Name>example-watermark</Name>
  6. <Width>10</Width>
  7. <Height>30</Height>
  8. <Dx>10</Dx>
  9. <Dy>5</Dy>
  10. <ReferPos>TopRight</ReferPos>
  11. <Type>Image</Type>
  12. <State>Normal</State>
  13. </WaterMarkTemplate>
  14. </AddWaterMarkTemplateResponse>

JSON

  1. {
  2. "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
  3. "WaterMarkTemplate": {
  4. "Id": "88c6ca184c0e47098a5b665e2a126797",
  5. "Name": "example-watermark",
  6. "Width": "10",
  7. "Height": "30",
  8. "Dx": "10",
  9. "Dy": "5",
  10. "ReferPos": "TopRight",
  11. "Type": "Image",
  12. "State": "Normal"
  13. }
  14. }
Thank you! We've received your feedback.