Domain name for API request: cfg.intl.tencentcloudapi.com.
This API is used to query a template library.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribeTemplate. |
Version | Yes | String | Common Params. The value used for this API: 2021-08-20. |
Region | No | String | Common Params. This parameter is not required. |
TemplateId | Yes | Integer | Template library ID |
Parameter Name | Type | Description |
---|---|---|
Template | Template | Template library details |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to query a template.
POST / HTTP/1.1
Host: cfg.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTemplate
<Common request parameters>
{
"TemplateId": 1175
}
{
"Response": {
"RequestId": "e5cf31b7-d530-4bce-8836-4c227b463b31",
"Template": {
"AlarmPolicy": [],
"ApmServiceList": [],
"Tags": [],
"TemplateCreateTime": "2023-10-09 11:03:31",
"TemplateDescription": "Test",
"TemplateGroups": [
{
"CreateTime": "2023-10-09 11:03:31",
"Description": "Test",
"Mode": 1,
"ObjectTypeId": 1,
"Order": 1,
"TemplateGroupActions": [
{
"ActionApiType": 1,
"ActionAttribute": 1,
"ActionId": 1,
"ActionTitle": "Shut down (test)",
"ActionType": "Platform",
"CreateTime": "2023-10-09 11:03:31",
"CustomConfiguration": "{}",
"ExecuteId": null,
"GeneralConfiguration": "{\"AliasTitle\": \"\", \"PreTimeWait\": 0, \"ActionTimeout\": 1800, \"AfterTimeWait\": 0}",
"Order": 1,
"RandomId": 368448,
"RecoverId": 232618,
"TemplateGroupActionId": 3982,
"UpdateTime": "2023-10-09 11:03:31"
},
{
"ActionApiType": 1,
"ActionAttribute": 2,
"ActionId": 2,
"ActionTitle": "Start up",
"ActionType": "Platform",
"CreateTime": "2023-10-09 11:03:31",
"CustomConfiguration": "{}",
"ExecuteId": 368448,
"GeneralConfiguration": "{\"PreTimeWait\": 0, \"ActionTimeout\": 1800, \"AfterTimeWait\": 0}",
"Order": 2,
"RandomId": 232618,
"RecoverId": null,
"TemplateGroupActionId": 3983,
"UpdateTime": "2023-10-09 11:03:31"
}
],
"TemplateGroupId": 1659,
"Title": "Test",
"UpdateTime": "2023-10-09 11:03:31"
}
],
"TemplateId": 1175,
"TemplateIsUsed": 1,
"TemplateMode": 1,
"TemplateMonitors": [
{
"MetricChineseName": "CPU utilization",
"MetricId": 614,
"MetricName": "CpuUsage",
"MonitorId": 2173,
"ObjectTypeId": 1
}
],
"TemplateOwnerUin": "700000174829",
"TemplatePauseDuration": 60,
"TemplatePolicy": null,
"TemplateRegionId": 1,
"TemplateSource": 0,
"TemplateTag": "",
"TemplateTitle": "Test",
"TemplateUpdateTime": "2023-10-09 11:03:31"
}
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
AuthFailure | CAM signature/authentication error. |
FailedOperation | Operation failed. |
InternalError | Internal error. |
InvalidParameter | Parameter error. |
InvalidParameterValue | Parameter value error. |
LimitExceeded | The quota limit is exceeded. |
MissingParameter | Parameters are missing |
OperationDenied | The operation is rejected. |
ResourceInUse | Resources are occupied. |
ResourceInsufficient | Insufficient resources. |
UnknownParameter | Unknown parameter. |
UnsupportedOperation | The operation is not supported. |
Was this page helpful?