You can call this operation to query information about stacks.

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 GetStack

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

RegionId String Yes cn-hangzhou

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

StackId String Yes 4a6c9851-3b0f-4f5f-b4ca-a14bf691f2ff

The ID of the stack.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

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 ensure that it is unique among different requests. It can only contain letters, digits, hyphens (-), and underscores (_) and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

Response parameters

Parameter Type Example Description
CreateTime String 2019-08-01T04:07:39

The time when the task was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.

Description String my stack description

The description of the stack.

DisableRollback Boolean false

Indicates whether rollback is disabled on stack creation failure. Valid values:

  • true: disables rollback on stack creation failure.
  • false: enables rollback on stack creation failure.
NotificationURLs ["http://127.0.0.1:8080/x", "http://127.0.0.1:8080/y"]

The callback URLs for receiving stack events.

Outputs [{"Description": "Instance ID","OutputKey": "InstanceId","OutputValue": "i-xxxxx"}]

The output parameters of the stack.

Parameters

The input parameters of the stack.

ParameterKey String InstanceType

The name of the parameter.

ParameterValue String ecs.cm4.6xlarge

The value of the parameter.

ParentStackId String xxxxxxx

The ID of the parent stack.

RegionId String cn-beijing

The region ID of the stack. For more information, see ROS regions.

Status String CREATE_COMPLETE

The status of the stack.

Valid values:

  • CREATE_IN_PROGRESS
  • CREATE_FAILED
  • CREATE_COMPLETE
  • UPDATE_IN_PROGRESS
  • UPDATE_FAILED
  • UPDATE_COMPLETE
  • DELETE_IN_PROGRESS
  • DELETE_FAILED
  • DELETE_COMPLETE
  • ROLLBACK_IN_PROGRESS
  • ROLLBACK_FAILED
  • ROLLBACK_COMPLETE
  • CHECK_IN_PROGRESS
  • CHECK_FAILED
  • CHECK_COMPLETE
  • REVIEW_IN_PROGRESS
StackId String 4a6c9851-3b0f-4f5f-b4ca-a14bf691f2ff

The ID of the stack.

StackName String MyStack

The name of the stack. The name can be up to 255 characters in length and can contain digits, letters, hyphens (-), and underscores (_). It must start with a digit or letter.

UpdateTime String 2019-08-01T04:07:39

The time when the task was last updated. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ss format. The time is displayed in UTC.

StatusReason String Stack successfully created

The reason that the stack is in its current status.

TemplateDescription String Some description

The description of the stack.

TimeoutInMinutes Integer 10

The timeout period that is specified for the stack creation request. Unit: minutes.

RequestId String B288A0BE-D927-4888-B0F7-B35EF84B6E6F

The ID of the request.

Examples

Sample requests


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

Sample success responses

XML format

<CreateStackResponse>
      <RegionId>cn-hangzhou</RegionId>
      <StackId>4a6c9851-3b0f-4f5f-b4ca-a14bf691f2ff</StackId>
      <StackName>StackName</StackName>
      <Status>CREATE_COMPLETE</Status>
      <StatusReason>Stack successfully created</StatusReason>
      <TemplateDescription>Some description</TemplateDescription>
      <TimeoutInMinutes>10</TimeoutInMinutes>
      <UpdatedTime>2019-08-01T04:07:39</UpdatedTime>
      <ParentStackId>xxxx</ParentStackId>
      <CreationTime>2019-08-01T04:07:39</CreationTime>
      <Description>No description</Description>
      <DisableRollback>false</DisableRollback>
      <NotificationURLs>
            <NotificationURL>http://127.0.0.1:8080/x</NotificationURL>
            <NotificationURL>http://127.0.0.1:8080/y</NotificationURL>
      </NotificationURLs>
      <Outputs>
            <Output>
                  <Description>Instance ID</Description>
                  <OutputKey>InstanceId</OutputKey>
                  <OutputValue>i-xxxxx</OutputValue>
            </Output>
      </Outputs>
      <Parameters>
            <Parameter>
                  <ParameterKey>InstanceType</ParameterKey>
                  <ParameterValue>ecs.cm4.6xlarge</ParameterValue>
            </Parameter>
      </Parameters>
      <RequestId>B288A0BE-D927-4888-B0F7-B35EF84B6E6F</RequestId>
</CreateStackResponse>

JSON format

{
	"Outputs":[
		{
			"Description":"Instance ID",
			"OutputValue":"i-xxxxx",
			"OutputKey":"InstanceId"
		}
	],
	"Parameters":[
		{
			"ParameterValue":"ecs.cm4.6xlarge",
			"ParameterKey":"InstanceType"
		}
	],
	"Description":"No description",
	"TimeoutInMinutes":10,
	"ParentStackId":"xxxx",
	"StackId":"4a6c9851-3b0f-4f5f-b4ca-a14bf691f2ff",
	"UpdatedTime":"2019-08-01T04:07:39",
	"DisableRollback":false,
	"StackName":"MyStack",
	"CreationTime":"2019-08-01T04:07:39",
	"Status":"CREATE_COMPLETE",
	"StatusReason":"Stack successfully created",
	"TemplateDescription":"Some description",
	"RequestId":"B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
	"RegionId":"cn-hangzhou",
	"NotificationURLs":[
		"http://127.0.0.1:8080/x",
		"http://127.0.0.1:8080/y"
	]
}

Error codes

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

For more information about errors common to all operations, see Common errors.

Error code

Error message

HTTP status code

Description

StackNotFound

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

404

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