You can call this operation to query the template of a resource by resource type.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetResourceTypeTemplate |
Set the value to GetResourceTypeTemplate. |
ResourceType | String | Yes | ALIYUN::ECS::VPC |
The type of the resource. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 87F54B2B-AEF0-4C33-A72A-3F8856A575E9 |
The ID of the request. |
TemplateBody | Map | {"ROSTemplateFormatVersion": "2015-09-01"} |
The structure that contains the template body. The template body must be 1 to 51,200 bytes in length. |
Examples
Sample requests
http(s)://ros.aliyuncs.com/? Action=GetResourceTypeTemplate
&ResourceType=ALIYUN::ECS::VPC
&<Common request parameters>
Sample success responses
XML
format
<GetResourceTypeTemplateResponse>
<RequestId type="string">87F54B2B-AEF0-4C33-A72A-3F8856A575E9</RequestId>
<TemplateBody class="object">
<Parameters class="object">
<CidrBlock class="object">
<Type type="string">String</Type>
</CidrBlock>
<Description class="object">
<Type type="string">String</Type>
</Description>
<ResourceGroupId class="object">
<Type type="string">String</Type>
</ResourceGroupId>
<VpcName class="object">
<Type type="string">String</Type>
</VpcName>
</Parameters>
<ROSTemplateFormatVersion type="string">2015-09-01</ROSTemplateFormatVersion>
<Resources class="object">
<Vpc class="object">
<Properties class="object">
<CidrBlock class="object">
<Ref type="string">CidrBlock</Ref>
</CidrBlock>
<Description class="object">
<Ref type="string">Description</Ref>
</Description>
<ResourceGroupId class="object">
<Ref type="string">ResourceGroupId</Ref>
</ResourceGroupId>
<VpcName class="object">
<Ref type="string">VpcName</Ref>
</VpcName>
</Properties>
<Type type="string">ALIYUN::ECS::VPC</Type>
</Vpc>
</Resources>
</TemplateBody>
</GetResourceTypeTemplateResponse>
JSON
format
{
"RequestId": "87F54B2B-AEF0-4C33-A72A-3F8856A575E9",
"TemplateBody": {
"Parameters": {
"CidrBlock": {
"Type": "String"
},
"Description": {
"Type": "String"
},
"ResourceGroupId": {
"Type": "String"
},
"VpcName": {
"Type": "String"
}
},
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"Vpc": {
"Properties": {
"CidrBlock": {
"Ref": "CidrBlock"
},
"Description": {
"Ref": "Description"
},
"ResourceGroupId": {
"Ref": "ResourceGroupId"
},
"VpcName": {
"Ref": "VpcName"
}
},
"Type": "ALIYUN::ECS::VPC"
}
}
}
}
Error codes
For a list of error codes, visit the API Error Center.
HTTP status code |
Error code |
Error message |
Description |
---|---|---|---|
404 |
ResourceTypeNotFound |
The Resource Type ({name}) could not be found. |
The error message returned because the specified resource type does not exist. name indicates the name of the resource type. |