Queries the information about a stack.
In this topic, the information about a stack whose ID is c754d2a4-28f1-46df-b557-9586173a****
is queried. The stack is deployed in the China (Hangzhou) region.
Debugging
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 ID of the region in which the stack resides. You can call the DescribeRegions operation to query the most recent list of Alibaba Cloud regions. |
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, For more information, see Ensure idempotence. |
OutputOption | String | No | Disabled |
Specifies whether to return the output parameters of the stack. Valid values:
|
ShowResourceProgress | String | No | Disabled |
Specifies whether to return the ResourceProgress parameter. Valid values:
|
LogOption | String | No | Stack |
The option for returning logs. Valid values:
|
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:
|
Description | String | Create a VPC. |
The description of the stack. |
Parameters | Array of Parameter |
The parameters of the stack. |
|
ParameterKey | String | ALIYUN::Region |
The name of the parameter. |
ParameterValue | String | cn-hangzhou |
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-09-16T08:21:40 |
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 for the stack. Valid values:
Note Deletion protection of a nested stack works in the same way as that of the 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 a VPC. |
The description of the template. |
StackType | String | ROS |
The type of the stack. Valid values:
|
RamRoleName | String | test-role |
The name of the RAM role. ROS assumes the RAM role to create the stack and uses credentials of the role to call the APIs of Alibaba Cloud services. ROS assumes the RAM role to perform operations on the stack. If you have permissions to perform operations on the stack but do not have permissions to use the RAM role, ROS still assumes the RAM role. You must make sure that the least privileges are granted to the role. If you do not specify this parameter, ROS assumes an existing role that is associated with the stack. If no roles are available for ROS to assume, ROS uses a temporary credential that is generated from the credentials of your account. The name of the RAM role can be up to 64 bytes in length. |
UpdateTime | String | 2020-09-17T08:21:40 |
The time when the stack was 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": "VPC ID","OutputKey": "VpcId","OutputValue": "vpc-bp1m6fww66xbntjyc****"}] |
The output parameters of the stack. Note This parameter is returned if the OutputOption parameter is set to Enabled.
|
DriftDetectionTime | String | 2020-09-16T09:21:40 |
The time when the last successful drift detection operation was performed. |
RegionId | String | cn-hangzhou |
The ID of the region in which the stack is deployed. You can call the DescribeRegions operation to query the most recent list of Alibaba Cloud regions. |
StackDriftStatus | String | IN_SYNC |
The status of the stack in the last successful drift detection. Valid values:
|
NotificationURLs | Array of String | ["http://127.XX.XX.1:8080/x", "http://127.0.XX.XX:8080/y"] |
The callback URLs that are used to receive stack events. |
DisableRollback | Boolean | false |
Indicates whether rollback is disabled when the stack fails to be created. Valid values:
|
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 within which the stack can be created. Unit: minutes. |
StackId | String | c754d2a4-28f1-46df-b557-9586173a**** |
The ID of the stack. |
ResourceGroupId | String | rg-acfmxazb4ph6aiy**** |
The ID of the resource group to which the instances belong. |
ResourceProgress | Object |
The creation progress of resources. |
|
TotalResourceCount | Integer | 2 |
The total number of resources. |
SuccessResourceCount | Integer | 1 |
The number of resources that are created. |
FailedResourceCount | Integer | 0 |
The number of resources that fail to be created. |
InProgressResourceCount | Integer | 1 |
The number of resources that are being created. |
PendingResourceCount | Integer | 0 |
The number of resources to be created. |
InProgressResourceDetails | Array of InProgressResourceDetail |
The progress details of resources that are being created. |
|
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. |
Log | Object |
The logs of the stack. |
|
TerraformLogs | Array of TerraformLog |
The logs of the Terraform stack. This parameter is returned only for a Terraform stack. This parameter is returned if the LogOption parameter is left empty or set to Stack or All. Note This parameter is not returned for a running stack. The logs are generated from the
last creation, re-creation, update, or deletion operation on the stack.
|
|
Command | String | apply |
The name of a Terraform command that is run. Valid values:
For more information about Terraform commands, see Basic CLI Features. |
Stream | String | stdout |
The output stream. Valid values:
|
Content | String | Apply complete! Resources: 42 added, 0 changed, 0 destroyed. |
The content of the output stream that is returned after the command is run. |
ResourceLogs | Array of ResourceLog |
The logs of resources in the stack. This parameter is returned if the LogOption parameter is set to Resource or All. Note The logs are returned for resources of specific types, such as
ALIYUN::ROS::ResourceCleaner .
|
|
ResourceName | String | MyResourceCleaner |
The name of the resource that is defined in the template. |
Logs | Array of Log |
The logs of all resources. |
|
Keys | Array of String | ResourceDetails |
The keywords. |
Content | String | [] |
The content of a resource log. |
TemplateId | String | a52f81be-496f-4e1c-a286-8852ab54**** |
The ID of the template. This parameter is returned only if the current template of the stack is a custom template or a shared template. If the template is a shared template, the value of this parameter is the same as the value of the TemplateARN parameter. |
TemplateVersion | String | v1 |
The version of the template. This parameter is returned only if the current template of the stack is a custom template or a shared template. If the template is a shared template, this parameter is returned only when the VersionOption parameter is set to AllVersions. Valid values: v1 to v100. |
TemplateScratchId | String | ts-7f7a704cf71c49a6**** |
The ID of the scenario. This parameter is returned only if the current template of the stack is generated from a scenario. |
TemplateURL | String | oss://ros/template/demo |
The URL of the file that contains the template body. This parameter is returned only if the current template of the stack is from a URL. The URL can point to a template that is located on an HTTP or HTTPS web server or in an Alibaba Cloud Object Storage Service (OSS) bucket. |
Interface | String | {} |
The description of the web UI in the ROS console. |
ServiceManaged | Boolean | false |
Indicates whether the stack is a managed stack. Valid values:
|
ServiceName | String | ACVS |
The name of the service to which the managed stack belongs. |
OperationInfo | Object |
The additional information that is displayed when an error occurs on a stack operation. Note This property is returned in specific conditions. At least one sub-property is returned.
For example, an error is reported when you call the API of another cloud service.
|
|
Code | String | DependencyViolation |
The error code returned. |
Message | String | There is still instance(s) in the specified security group. |
The error message returned. |
RequestId | String | 071D6166-3F6B-5C7B-A1F0-0113FBB643A8 |
The ID of the request to call the API of another cloud service. |
Action | String | DeleteSecurityGroup |
The name of the API of another cloud service. |
ResourceType | String | ALIYUN::ECS::SecurityGroup |
The type of the resource on which the operation error occurred. |
LogicalResourceId | String | EcsSecurityGroup |
The logical ID of the resource on which the operation error occurred. |
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>
<Status>CREATE_COMPLETE</Status>
<Description>Create a VPC.</Description>
<Parameters>
<ParameterKey>ALIYUN::Region</ParameterKey>
<ParameterValue>cn-hangzhou</ParameterValue>
</Parameters>
<RequestId>B288A0BE-D927-4888-B0F7-B35EF84B6E6F</RequestId>
<StatusReason>Stack CREATE completed successfully</StatusReason>
<ParentStackId>4a6c9851-3b0f-4f5f-b4ca-a14bf692****</ParentStackId>
<CreateTime>2020-09-16T08:21:40</CreateTime>
<DeletionProtection>Disabled</DeletionProtection>
<RootStackId>4a6c9851-3b0f-4f5f-b4ca-a14bf692****</RootStackId>
<TemplateDescription>Create a VPC.</TemplateDescription>
<StackType>ROS</StackType>
<RamRoleName>test-role</RamRoleName>
<UpdateTime>2020-09-17T08:21:40</UpdateTime>
<Outputs/>
<DriftDetectionTime>2020-09-16T09:21:40</DriftDetectionTime>
<RegionId>cn-hangzhou</RegionId>
<StackDriftStatus>IN_SYNC</StackDriftStatus>
<NotificationURLs>["http://127.XX.XX.1:8080/x", "http://127.0.XX.XX:8080/y"]</NotificationURLs>
<DisableRollback>false</DisableRollback>
<StackName>MyStack</StackName>
<Tags>
<Key>usage</Key>
<Value>test</Value>
</Tags>
<TimeoutInMinutes>10</TimeoutInMinutes>
<StackId>c754d2a4-28f1-46df-b557-9586173a****</StackId>
<ResourceGroupId>rg-acfmxazb4ph6aiy****</ResourceGroupId>
<ResourceProgress>
<TotalResourceCount>2</TotalResourceCount>
<SuccessResourceCount>1</SuccessResourceCount>
<FailedResourceCount>0</FailedResourceCount>
<InProgressResourceCount>1</InProgressResourceCount>
<PendingResourceCount>0</PendingResourceCount>
<InProgressResourceDetails>
<ResourceName>WaitCondition</ResourceName>
<ResourceType>ALIYUN::ROS::WaitCondition</ResourceType>
<ProgressValue>5</ProgressValue>
<ProgressTargetValue>10</ProgressTargetValue>
</InProgressResourceDetails>
</ResourceProgress>
<Log>
<TerraformLogs>
<Command>apply</Command>
<Stream>stdout</Stream>
<Content>Apply complete! Resources: 42 added, 0 changed, 0 destroyed.</Content>
</TerraformLogs>
<ResourceLogs>
<ResourceName>MyResourceCleaner</ResourceName>
<Logs>
<Keys>ResourceDetails</Keys>
<Content>[]</Content>
</Logs>
</ResourceLogs>
</Log>
<TemplateId>a52f81be-496f-4e1c-a286-8852ab54****</TemplateId>
<TemplateVersion>v1</TemplateVersion>
<TemplateScratchId>ts-7f7a704cf71c49a6****</TemplateScratchId>
<TemplateURL>oss://ros/template/demo</TemplateURL>
<Interface>{}</Interface>
<ServiceManaged>false</ServiceManaged>
<ServiceName>ACVS</ServiceName>
<OperationInfo>
<Code>DependencyViolation</Code>
<Message>There is still instance(s) in the specified security group.</Message>
<RequestId>071D6166-3F6B-5C7B-A1F0-0113FBB643A8</RequestId>
<Action>DeleteSecurityGroup</Action>
<ResourceType>ALIYUN::ECS::SecurityGroup</ResourceType>
<LogicalResourceId>EcsSecurityGroup</LogicalResourceId>
</OperationInfo>
</GetStackResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Status" : "CREATE_COMPLETE",
"Description" : "Create a VPC.",
"Parameters" : {
"ParameterKey" : "ALIYUN::Region",
"ParameterValue" : "cn-hangzhou"
},
"RequestId" : "B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
"StatusReason" : "Stack CREATE completed successfully",
"ParentStackId" : "4a6c9851-3b0f-4f5f-b4ca-a14bf692****",
"CreateTime" : "2020-09-16T08:21:40",
"DeletionProtection" : "Disabled",
"RootStackId" : "4a6c9851-3b0f-4f5f-b4ca-a14bf692****",
"TemplateDescription" : "Create a VPC.",
"StackType" : "ROS",
"RamRoleName" : "test-role",
"UpdateTime" : "2020-09-17T08:21:40",
"Outputs" : "",
"DriftDetectionTime" : "2020-09-16T09:21:40",
"RegionId" : "cn-hangzhou",
"StackDriftStatus" : "IN_SYNC",
"NotificationURLs" : "[\"http://127.XX.XX.1:8080/x\", \"http://127.0.XX.XX:8080/y\"]",
"DisableRollback" : false,
"StackName" : "MyStack",
"Tags" : {
"Key" : "usage",
"Value" : "test"
},
"TimeoutInMinutes" : 10,
"StackId" : "c754d2a4-28f1-46df-b557-9586173a****",
"ResourceGroupId" : "rg-acfmxazb4ph6aiy****",
"ResourceProgress" : {
"TotalResourceCount" : 2,
"SuccessResourceCount" : 1,
"FailedResourceCount" : 0,
"InProgressResourceCount" : 1,
"PendingResourceCount" : 0,
"InProgressResourceDetails" : {
"ResourceName" : "WaitCondition",
"ResourceType" : "ALIYUN::ROS::WaitCondition",
"ProgressValue" : 5,
"ProgressTargetValue" : 10
}
},
"Log" : {
"TerraformLogs" : {
"Command" : "apply",
"Stream" : "stdout",
"Content" : "Apply complete! Resources: 42 added, 0 changed, 0 destroyed."
},
"ResourceLogs" : {
"ResourceName" : "MyResourceCleaner",
"Logs" : {
"Keys" : "ResourceDetails",
"Content" : "[]"
}
}
},
"TemplateId" : "a52f81be-496f-4e1c-a286-8852ab54****",
"TemplateVersion" : "v1",
"TemplateScratchId" : "ts-7f7a704cf71c49a6****",
"TemplateURL" : "oss://ros/template/demo",
"Interface" : "{}",
"ServiceManaged" : false,
"ServiceName" : "ACVS",
"OperationInfo" : {
"Code" : "DependencyViolation",
"Message" : "There is still instance(s) in the specified security group.",
"RequestId" : "071D6166-3F6B-5C7B-A1F0-0113FBB643A8",
"Action" : "DeleteSecurityGroup",
"ResourceType" : "ALIYUN::ECS::SecurityGroup",
"LogicalResourceId" : "EcsSecurityGroup"
}
}
Error codes
For a list of error codes, see Service error codes.
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 name or ID of the stack. |