Queries the information about a new or existing template.

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 GetTemplateSummary

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

StackId String No 4a6c9851-3b0f-4f5f-b4ca-a14bf691****

The ID of the stack.

You can specify only one of the following parameters: TemplateBody, TemplateURL, TemplateId, StackId, ChangeSetId, and StackGroupName.

TemplateBody String No {"ROSTemplateFormatVersion":"2015-09-01"}

The structure that contains the template body. The template body must be 1 to 524,288 bytes in length.

If the length of the template body exceeds the upper limit, we recommend that you add parameters to the HTTP POST request body to prevent request failures caused by excessively long URLs.

You can specify only one of the following parameters: TemplateBody, TemplateURL, TemplateId, StackId, ChangeSetId, and StackGroupName.

RegionId String No cn-hangzhou

The ID of the region to which the stack or stack group in the template belongs. You can call the DescribeRegions operation to query the most recent region list.

This parameter takes effect only when you specify the StackId, ChangeSetId, or StackGroupName parameter.

TemplateId String No 5ecd1e10-b0e9-4389-a565-e4c15efc****

The ID of the template. This parameter applies to shared and private templates.

You can specify only one of the following parameters: TemplateBody, TemplateURL, TemplateId, StackId, ChangeSetId, and StackGroupName.

TemplateURL String No oss://ros/template/demo

The URL of the file that contains the template body. The URL must point to a template that is located on an HTTP or HTTPS web server or in an Alibaba Cloud Object Storage Service (OSS) bucket, such as oss://ros/template/demo or oss://ros/template/demo?RegionId=cn-hangzhou. The template body can be up to 524,288 bytes in length.

Note If you do not specify the region of the OSS bucket, the value of the RegionId parameter is used.

You can specify only one of the following parameters: TemplateBody, TemplateURL, TemplateId, StackId, ChangeSetId, and StackGroupName.

The URL can be up to 1,024 bytes in length.

ChangeSetId String No 1f6521a4-05af-4975-afe9-bc4b45ad****

The ID of the change set.

You can specify only one of the following parameters: TemplateBody, TemplateURL, TemplateId, StackId, ChangeSetId, and StackGroupName.

TemplateVersion String No v1

The version of the template. This parameter takes effect when you specify the TemplateId parameter.

StackGroupName String No my-stack-group

The name of the stack group.

You can specify only one of the following parameters: TemplateBody, TemplateURL, TemplateId, StackId, ChangeSetId, and StackGroupName.

Parameters.N.ParameterKey String No InstanceId

The name of parameter N that is defined in the template. If you do not specify the name and value of a parameter, Resource Orchestration Service (ROS) uses the default name and value in the template.

Maximum value of N: 200.

Note The Parameters parameter is optional. If you need to specify Parameters, you must specify both Parameters.N.ParameterKey and Parameters.N.ParameterValue.
Parameters.N.ParameterValue String No i-rotp2e20whfrs2****

The value of parameter N that is defined in the template.

Maximum value of N: 200.

Note The Parameters parameter is optional. If you need to specify Parameters, you must specify both Parameters.N.ParameterKey and Parameters.N.ParameterValue.
ClientToken String No 123e4567-e89b-12d3-a456-42665544****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests.

The token can be up to 64 characters in length, and can contain letters, digits, hyphens (-), and underscores (_).

For more information, see Ensure idempotence.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
ResourceTypes Array of String ["ALIYUN::ECS::VPC"]

All resource types that are used in the template.

Description String No description

The description of the stack template.

Parameters Array of Object [{"Description":"", "Label":"Name", "NoEcho":"false", "ParameterKey":"Name", "Type":"String"}]

The declarations of the parameters in the template.

RequestId String B288A0BE-D927-4888-B0F7-B35EF84B6E6

The ID of the request.

Version String 2015-09-01

The version of the template.

Metadata Map

The metadata that is defined in the template.

ResourceIdentifierSummaries Array of ResourceIdentifierSummary

The resource identifier summaries that describe the resources that you want to import and the properties that are used to identify the resources during the import.

For example, VpcId is an identifier property for ALIYUN::ECS::VPC resources.

ResourceType String ALIYUN::ECS::VPC

The resource type.

Note You can import resources of the type that is specified by the ResouceType parameter.
LogicalResourceIds Array of String ["Vpc"]

The logical IDs of all resources of the type that is specified by the ResouceType parameter in the template.

ResourceIdentifiers Array of String ["VpcId"]

The resource properties. You can use a resource property to identify the resources that you want to manage. For example, VpcId is an identifier property for ALIYUN::ECS::VPC resources.

Examples

Sample requests

http(s)://ros.aliyuncs.com/?Action=GetTemplateSummary
&StackId=4a6c9851-3b0f-4f5f-b4ca-a14bf691****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

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

<GetTemplateSummary>
		<Description>No description</Description>
		<Metadata />
		<Parameters>
			<Description>Description of the vpc, [2, 256] characters. Do not fill or empty, the default is empty.</Description>
			<Label>Description</Label>
			<NoEcho>false</NoEcho>
			<ParameterKey>Description</ParameterKey>
			<Type>String</Type>
		</Parameters>
		<Parameters>
			<Description>Tags to attach to vpc. Max support 20 tags to add during create vpc. Each tag with two properties Key and Value, and Key is required.</Description>
			<Label>Tags</Label>
			<MaxLength>20</MaxLength>
			<NoEcho>false</NoEcho>
			<ParameterKey>Tags</ParameterKey>
			<Type>Json</Type>
		</Parameters>
		<Parameters>
			<Description>IPv6 network cidr of the VPC.</Description>
			<Label>Ipv6CidrBlock</Label>
			<MinLength>1</MinLength>
			<NoEcho>false</NoEcho>
			<ParameterKey>Ipv6CidrBlock</ParameterKey>
			<Type>String</Type>
		</Parameters>
		<Parameters>
			<AllowedValues>True</AllowedValues>
			<AllowedValues>true</AllowedValues>
			<AllowedValues>False</AllowedValues>
			<AllowedValues>false</AllowedValues>
			<Default>false</Default>
			<Description>Whether to enable an IPv6 network cidr, the value is:False (default): not turned on.True: On.</Description>
			<Label>EnableIpv6</Label>
			<NoEcho>false</NoEcho>
			<ParameterKey>EnableIpv6</ParameterKey>
			<Type>Boolean</Type>
		</Parameters>
		<Parameters>
			<Description>Resource group id.</Description>
			<Label>ResourceGroupId</Label>
			<NoEcho>false</NoEcho>
			<ParameterKey>ResourceGroupId</ParameterKey>
			<Type>String</Type>
		</Parameters>
		<Parameters>
			<Description>Display name of the vpc instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'</Description>
			<Label>VpcName</Label>
			<NoEcho>false</NoEcho>
			<ParameterKey>VpcName</ParameterKey>
			<Type>String</Type>
		</Parameters>
		<Parameters>
			<Description>
				The IP address range of the VPC in the CIDR block form. You can use the following IP address ranges and their subnets:
				10.0.0.0/8
				172.16.0.0/12 (Default)
			    192.168.0.0/16</Description>
			<Label>CidrBlock</Label>
			<NoEcho>false</NoEcho>
			<ParameterKey>CidrBlock</ParameterKey>
			<Type>String</Type>
		</Parameters>
		<RequestId>FD70598C-3F4B-4E66-9A76-67F2E2D36938</RequestId>
		<ResourceIdentifierSummaries>
			<LogicalResourceIds>Vpc</LogicalResourceIds>
			<ResourceIdentifiers>VpcId</ResourceIdentifiers>
			<ResourceType>ALIYUN::ECS::VPC</ResourceType>
		</ResourceIdentifierSummaries>
		<ResourceTypes>ALIYUN::ECS::VPC</ResourceTypes>
		<Version>2015-09-01</Version>
</GetTemplateSummary>

JSON format

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

{
  "Description" : "No description",
  "Metadata" : { },
  "Parameters" : [ {
    "Description" : "Description of the vpc, [2, 256] characters. Do not fill or empty, the default is empty.",
    "Label" : "Description",
    "NoEcho" : "false",
    "ParameterKey" : "Description",
    "Type" : "String"
  }, {
    "Description" : "Tags to attach to vpc. Max support 20 tags to add during create vpc. Each tag with two properties Key and Value, and Key is required.",
    "Label" : "Tags",
    "MaxLength" : 20,
    "NoEcho" : "false",
    "ParameterKey" : "Tags",
    "Type" : "Json"
  }, {
    "Description" : "IPv6 network cidr of the VPC.",
    "Label" : "Ipv6CidrBlock",
    "MinLength" : 1,
    "NoEcho" : "false",
    "ParameterKey" : "Ipv6CidrBlock",
    "Type" : "String"
  }, {
    "AllowedValues" : [ "True", "true", "False", "false" ],
    "Default" : false,
    "Description" : "Whether to enable an IPv6 network cidr, the value is:False (default): not turned on.True: On.",
    "Label" : "EnableIpv6",
    "NoEcho" : "false",
    "ParameterKey" : "EnableIpv6",
    "Type" : "Boolean"
  }, {
    "Description" : "Resource group id.",
    "Label" : "ResourceGroupId",
    "NoEcho" : "false",
    "ParameterKey" : "ResourceGroupId",
    "Type" : "String"
  }, {
    "Description" : "Display name of the vpc instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'",
    "Label" : "VpcName",
    "NoEcho" : "false",
    "ParameterKey" : "VpcName",
    "Type" : "String"
  }, {
    "Description" : "The IP address range of the VPC in the CIDR block form. You can use the following IP address ranges and their subnets:\n10.0.0.0/8\n172.16.0.0/12 (Default)\n192.168.0.0/16",
    "Label" : "CidrBlock",
    "NoEcho" : "false",
    "ParameterKey" : "CidrBlock",
    "Type" : "String"
  } ],
  "RequestId" : "FD70598C-3F4B-4E66-9A76-67F2E2D36938",
  "ResourceIdentifierSummaries" : [ {
    "LogicalResourceIds" : [ "Vpc" ],
    "ResourceIdentifiers" : [ "VpcId" ],
    "ResourceType" : "ALIYUN::ECS::VPC"
  } ],
  "ResourceTypes" : [ "ALIYUN::ECS::VPC" ],
  "Version" : "2015-09-01"
}

Error codes

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

HTTP status code

Error code

Error message

Description

400

StackValidationFailed

{reason}.

The error message returned because the stack failed to be validated. reason indicates the cause of the error.

404

ChangeSetNotFound

The ChangeSet ({name}) of Stack ({stack}) could not be found.

The error message returned because the change set does not exist. name indicates the name or ID of the change set. stack indicates the name or ID of the stack.

404

ChangeSetNotFound

The ChangeSet {ID} could not be found.

The error message returned because the change set does not exist. ID indicates the ID of the change set.

404

StackNotFound

The Stack ({name}) could not be found.

The error message returned because the stack does not exist. name indicates the name or ID of the stack.

404

TemplateNotFound

The Tempalte ({ ID }) could not be found.

The error message returned because the template does not exist. ID indicates the ID of the template.

404

TemplateNotFound

The Template { ID } with version { version } could not be found.

The error message returned because the template or the specified template version does not exist. ID indicates the ID of the template. version indicates the version of the template.