tencent cloud

Cloud Infinite

Updating a Template

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-09-08 16:56:48

Feature Description

Refresh the image processing template.

Authorization Description

When using a sub-account, you need to add the ci:UpdateMediaTemplate permission to the action in the authorization policy. For all supported operations in Cloud Infinite, please refer to CI action.

Service Activation

To use this feature, bind a bucket in advance and enable the Cloud Infinite service.
To use this feature, enable the Image Processing (Async) service in advance via the console or API.
Note:
Note: After binding Cloud Infinite (CI), if you manually perform the unbinding operation on a bucket, you will not be able to continue using this function.

Use Limits

When using this API, please confirm the related use limits. For details, see Use Limits.


Request

Request sample

PUT /template/<TemplateId> HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Content-Length: <length>
Content-Type: application/xml

<body>
Note:
Authorization: Auth String. For details, see the Request Signature document.
TemplateId: ID of the image processing template, can be obtained from the create image processing template response.

Request header

This API only uses common request headers. For details, see Common Request Headers documentation.

Request body

The following figure shows the request bodies required for implementing this request operation.
<Request>
<Tag>PicProcess</Tag>
<Name>TemplateName</Name>
<PicProcess>
<IsPicInfo>true</IsPicInfo>
<ProcessRule>imageMogr2/rotate/90</ProcessRule>
</PicProcess>
</Request>
The detailed data is described as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Request
None.
Container
Yes

Response

Response Headers

This API only returns the public response header. For details, see Common Response Headers documentation.

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:
<Response>
<RequestId>NjQ0NGNlNDZfMThhYTk0MGFfY*********</RequestId>
<Template>
<Tag>PicProcess</Tag>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Name>TemplateName</Name>
<BucketId>test-1234567890</BucketId>
<Category>Custom</Category>
<PicProcess>
<IsPicInfo>true</IsPicInfo>
<ProcessRule>imageMogr2/rotate/90</ProcessRule>
</PicProcess>
<CreateTime>2020-08-05T11:35:24+0800</CreateTime>
<UpdateTime>2020-08-31T16:15:20+0800</UpdateTime>
</Template>
</Response>
The data are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
Container

Error Code

This request returns common error responses and error codes. For more information, see Error Codes.

Practical Case

Request

PUT /template/t1460606b9752148c4ab182f55163ba7cd HTTP/1.1
Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=****************************************
Host: test-1234567890.ci.ap-beijing.myqcloud.com
Content-Length: 1666
Content-Type: application/xml

<Request>
<Tag>PicProcess</Tag>
<Name>TemplateName</Name>
<PicProcess>
<IsPicInfo>true</IsPicInfo>
<ProcessRule>imageMogr2/rotate/90</ProcessRule>
</PicProcess>
</Request>

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 100
Connection: keep-alive
Date: Thu, 14 Jul 2022 12:37:29 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****

<Response>
<RequestId>NTk0MjdmODlfMjQ4OGY3XzYzYzhf****</RequestId>
<Template>
<Tag>PicProcess</Tag>
<TemplateId>t1460606b9752148c4ab182f55163ba7cd</TemplateId>
<Name>TemplateName</Name>
<BucketId>test-1234567890</BucketId>
<Category>Custom</Category>
<PicProcess>
<IsPicInfo>true</IsPicInfo>
<ProcessRule>imageMogr2/rotate/90</ProcessRule>
</PicProcess>
<CreateTime>2020-08-05T11:35:24+0800</CreateTime>
<UpdateTime>2020-08-31T16:15:20+0800</UpdateTime>
</Template>
</Response>


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック