Queries information of a stack.

In this topic, the information of the stack whose ID is c754d2a4-28f1-46df-b557-9586173a**** is queried. The stack is deployed in the China (Hangzhou) region.

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.

StackId String Yes c754d2a4-28f1-46df-b557-9586173a****

The ID of the stack.

RegionId String Yes cn-hangzhou

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

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 ensure that it 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 How to ensure idempotence.

OutputOption String No Disabled

Specifies whether to return the list of output parameters. Default value: Enabled. Valid values:

  • Enabled: The list of output parameters is returned.
  • Disabled: The list of output parameters is not returned.
    Note Output parameters are time-consuming to calculate. If you do not require output parameters, we recommend that you set OutputOption to Disabled to improve the operation response speed.
ShowResourceProgress String No Disabled

Specifies whether to show the resource creation progress. Default value: Disabled. Valid values:

  • Disabled: The resource creation progress is not shown.
  • EnabledIfCreateStack: The resource creation progress is shown only when you create a stack.
    Note When you create a stack, the state of the stack can be CREATE_IN_PROGRESS, CREATE_COMPLETE, CREATE_FAILED, CREATE_ROLLBACK_IN_PROGRESS, CREATE_ROLLBACK_COMPLETE, or CREATE_ROLLBACK_FAILED.

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

Response parameters

Parameter Type Example Description
Status String CREATE_COMPLETE

The state 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
  • CREATE_ROLLBACK_IN_PROGRESS
  • CREATE_ROLLBACK_FAILED
  • CREATE_ROLLBACK_COMPLETE
  • ROLLBACK_IN_PROGRESS
  • ROLLBACK_FAILED
  • ROLLBACK_COMPLETE
  • CHECK_IN_PROGRESS
  • CHECK_FAILED
  • CHECK_COMPLETE
  • REVIEW_IN_PROGRESS
  • IMPORT_CREATE_IN_PROGRESS
  • IMPORT_CREATE_FAILED
  • IMPORT_CREATE_COMPLETE
  • IMPORT_CREATE_ROLLBACK_IN_PROGRESS
  • IMPORT_CREATE_ROLLBACK_FAILED
  • IMPORT_CREATE_ROLLBACK_COMPLETE
  • IMPORT_UPDATE_IN_PROGRESS
  • IMPORT_UPDATE_FAILED
  • IMPORT_UPDATE_COMPLETE
  • IMPORT_UPDATE_ROLLBACK_IN_PROGRESS
  • IMPORT_UPDATE_ROLLBACK_FAILED
  • IMPORT_UPDATE_ROLLBACK_COMPLETE
Description String my stack description

The description of the stack.

Parameters Array of Parameter

The input parameters of the stack.

ParameterKey String InstanceType

The key of the parameter.

ParameterValue String ecs.cm4.6xlarge

The value of the parameter.

RequestId String B288A0BE-D927-4888-B0F7-B35EF84B6E6F

The ID of the request.

StatusReason String Stack CREATE completed successfully

The reason why the stack is in its current state.

ParentStackId String 4a6c9851-3b0f-4f5f-b4ca-a14bf692****

The ID of the parent stack.

CreateTime String 2020-10-14T01:55:01

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

DeletionProtection String Disabled

Indicates whether deletion protection is enabled on the stack. Valid values:

  • Enabled: Deletion protection is enabled on the stack.
  • Disabled: Deletion protection is disabled on the stack. You can release the stack by using the Resource Orchestration Service (ROS) console or calling the DeleteStack operation.
Note The deletion protection property of a nested stack is the same as that of its root stack.
RootStackId String 4a6c9851-3b0f-4f5f-b4ca-a14bf692****

The ID of the root stack. This parameter is returned if the specified stack is a nested stack.

TemplateDescription String Create an ECS instance

The description of the template.

StackType String ROS

The stack type. Valid values:

  • ROS: The stack was created based on an ROS template.
  • Terraform: The stack was created based on a Terraform template.
RamRoleName String test-role

The name of the Resource Access Management (RAM) role. ROS assumes the specified RAM role to create the stack and call API operations by using the credentials of the role.

All operations are performed under this role. If a RAM user is authorized to perform operations on the stack but does not have permissions to use the role, ROS grants the minimum privileges required and continues to use the role.

If you do not specify this parameter, ROS uses the role previously associated with the stack. If no roles are available, ROS uses the temporary credentials generated from the credentials of your account.

The RAM role name can be up to 64 characters in length.

UpdateTime String 2020-11-14T01:55:01

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

Outputs Array of Object [{"Description": "Instance ID","OutputKey": "InstanceId","OutputValue": "i-a****"}]

The list of output parameters of the stack.

Note This parameter is returned when OutputOption is set to Enabled.
DriftDetectionTime String 2021-02-27T07:47:47

The time when the most recent successful drift detection operation was initiated.

RegionId String cn-hangzhou

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

StackDriftStatus String IN_SYNC

The drift status of the stack in the latest successful drift detection. Valid values:

  • DRIFTED: The stack has drifted.
  • NOT_CHECKED: No drift detection has been completed on the stack.
  • IN_SYNC: The stack is being synchronized.
NotificationURLs Array of String ["http://127.XX.XX.1:8080/x", "http://127.0.XX.XX:8080/y"]

The callback URLs for receiving stack events.

DisableRollback Boolean false

Indicates whether rollback is disabled when the stack fails to be created. Default value: false. Valid values:

  • true: Rollback is disabled.
  • false: Rollback is enabled.
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.

Tags Array of Tag

The tags of the stack.

Key String usage

The tag key of the stack.

Value String test

The tag value of the stack.

TimeoutInMinutes Integer 10

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

StackId String c754d2a4-28f1-46df-b557-9586173a****

The ID of the stack.

ResourceGroupId String rg-acfmxazb4ph6aiy****

The ID of the resource group.

ResourceProgress Object

The resource creation process.

TotalResourceCount Integer 2

The total number of resources.

SuccessResourceCount Integer 1

The number of resources that were processed.

FailedResourceCount Integer 0

The number of resources that failed to be processed.

InProgressResourceCount Integer 1

The number of resources that are being processed.

PendingResourceCount Integer 0

The number of resources to be processed.

InProgressResourceDetails Array of InProgressResourceDetail

The progress details of resources that are being processed.

ResourceName String WaitCondition

The name of the resource.

ResourceType String ALIYUN::ROS::WaitCondition

The type of the resource.

ProgressValue Float 5

The current progress value of the resource.

ProgressTargetValue Float 10

The desired progress value of the resource.

Examples

Sample requests

http(s)://ros.aliyuncs.com/?Action=GetStack
&StackId=c754d2a4-28f1-46df-b557-9586173a****
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

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

<GetStackResponse>
	<Description>my stack description</Description>
	<ResourceGroupId>rg-acfmxazb4ph6aiy****</ResourceGroupId>
	<TemplateDescription>Create an ECS instance</TemplateDescription>
	<DisableRollback>true</DisableRollback>
	<Tags>
		<Value>TayValue1</Value>
		<Key>TagKey1</Key>
	</Tags>
	<Status>CREATE_COMPLETE</Status>
	<Parameters>
		<ParameterValue>151266687691****</ParameterValue>
		<ParameterKey>ALIYUN::AccountId</ParameterKey>
	</Parameters>
	<Parameters>
		<ParameterValue>ecs.cm4.6xlarge</ParameterValue>
		<ParameterKey>InstanceType</ParameterKey>
	</Parameters>
	<Parameters>
		<ParameterValue>cn-hangzhou</ParameterValue>
		<ParameterKey>ALIYUN::Region</ParameterKey>
	</Parameters>
	<Parameters>
		<ParameterValue>c754d2a4-28f1-46df-b557-9586173a****</ParameterValue>
		<ParameterKey>ALIYUN::StackId</ParameterKey>
	</Parameters>
	<Parameters>
		<ParameterValue>StackGroup-bff_Group-3633c079-7d1c-4a4c-b47a-96a7f938****</ParameterValue>
		<ParameterKey>ALIYUN::StackName</ParameterKey>
	</Parameters>
	<Parameters>
		<ParameterValue>151266687691****</ParameterValue>
		<ParameterKey>ALIYUN::TenantId</ParameterKey>
	</Parameters>
	<RequestId>B288A0BE-D927-4888-B0F7-B35EF84B6E6F</RequestId>
	<StatusReason>Stack CREATE completed successfully</StatusReason>
	<CreateTime>2020-10-14T01:55:01</CreateTime>
	<DeletionProtection>Disabled</DeletionProtection>
	<StackType>ROS</StackType>
	<RegionId>cn-hangzhou</RegionId>
	<StackName>StackGroup-bff_Group-3633c079-7d1c-4a4c-b47a-96a7f938ed22</StackName>
	<StackId>c754d2a4-28f1-46df-b557-9586173a****</StackId>
</GetStackResponse>

JSON format

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

{
  "Description" : "my stack description",
  "ResourceGroupId" : "rg-acfmxazb4ph6aiy****",
  "TemplateDescription" : "Create an ECS instance",
  "DisableRollback" : true,
  "Tags" : [ {
    "Value" : "TayValue1",
    "Key" : "TagKey1"
  } ],
  "Status" : "CREATE_COMPLETE",
  "Parameters" : [ {
    "ParameterValue" : "151266687691****",
    "ParameterKey" : "ALIYUN::AccountId"
  }, {
    "ParameterValue" : "ecs.cm4.6xlarge",
    "ParameterKey" : "InstanceType"
  }, {
    "ParameterValue" : "cn-hangzhou",
    "ParameterKey" : "ALIYUN::Region"
  }, {
    "ParameterValue" : "c754d2a4-28f1-46df-b557-9586173a****",
    "ParameterKey" : "ALIYUN::StackId"
  }, {
    "ParameterValue" : "StackGroup-bff_Group-3633c079-7d1c-4a4c-b47a-96a7f938****",
    "ParameterKey" : "ALIYUN::StackName"
  }, {
    "ParameterValue" : "151266687691****",
    "ParameterKey" : "ALIYUN::TenantId"
  } ],
  "RequestId" : "B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
  "StatusReason" : "Stack CREATE completed successfully",
  "CreateTime" : "2020-10-14T01:55:01",
  "DeletionProtection" : "Disabled",
  "StackType" : "ROS",
  "RegionId" : "cn-hangzhou",
  "StackName" : "StackGroup-bff_Group-3633c079-7d1c-4a4c-b47a-96a7f938ed22",
  "StackId" : "c754d2a4-28f1-46df-b557-9586173a****"
}

Error codes

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

HttpCode

Error code

Error message

Description

404

StackNotFound

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

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