You can call this operation to obtain information GetTemplateSummary 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 Required 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.

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 request is long, we recommend that you use HTTP POST + Body Param to pass the parameters in the request Body. This prevents the request from failing because the URL is too long.

You can specify either the TemplateBody parameter or the TemplateURL parameter. But you cannot specify both of them.

Region ID  String  No cn-hangzhou

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

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

The ID of the instance launch template.

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

The URL for the file that contains the template body. The URL must point to a template located in an HTTP or HTTPS Web server or an Alibaba Cloud OSS bucket. RegionId=cn-hangzhou). The maximum size of a template is 524,288 bytes.

Note If the region of the OSS bucket is not specified, the RegionId parameter value is used by default.

You can specify either the TemplateBody parameter or the TemplateURL parameter. But you cannot specify both of them.

The maximum length of a URL is 1,024 bytes.

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

The ID of the change set.

Response parameters

Parameter Type Sample response Description 
Description String No description

The description of the stack template.

Metadata Map {"key": "value"}

The Metadata defined in the template.

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

The list of parameter declarations. Properties that describe the parameter.

RequestId String B288A0BE-D927-4888-B0F7-B35EF84B6E6

The ID of the request.

ResourceIdentifierSummaries Array

List of resource identifier summaries.

The summary describes the target resources of the import operation and the attributes that can be provided to identify the target resources during the import process. For example, the VPC ID is ALIYUN::ECS:: identifier property of a VPC resource.

LogicalResourceIds List ["Vpc"]

The logical ID of the ResourceType resource in the template.

ResourceIdentifiers List ["VpcId"]

The attributes of the resource. Used to identify the target resource. For example, the VPC ID is ALIYUN::ECS:: identifier property of a VPC resource.

ResourceType String ALIYUN::ECS::VPC

The type of the resource.

Note This resource type supports resource import.
ResourceTypes List ["ALIYUN::ECS::VPC"]

All resource types used in the template.

Version String 2015-09-01

The version of the template.

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

<GetTemplateSummary>
		  <Description>No description</Description>
		  <Metadata></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

{
    "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 more information about error codes, visit API Error Center.

HTTP status code

Error code

Error message

Description

400

StackValidationFailed

{reason}.

The error message returned because the stack validation failed. reason indicates the specific reason.

404

ChangeSetNotFound

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

The change set does not exist. name specifies the name or ID of the change set, and stack specifies the name or ID of the stack.

404

ChangeSetNotFound

The ChangeSet {ID} could not be found.

The change set does not exist. ID is the ID of the change set.

404

StackNotFound

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

The error message returned because the specified 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 specified template does not exist. ID: The template ID.