For more information about common request parameters, see \[Common parameters]\(~~131957~~).
Operation description
Http status code | Error code | Error message | Description |
---|---|---|---|
404 | ResourceNotFound | The Resource ({name}) could not be found in Stack {stack}. | The error message returned because the specified resource does not exist in the stack. name indicates the resource name. stack indicates the stack name or ID. |
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. |
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ros:GetStackResource | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
StackId | string | Yes | The ID of the region to which the stack belongs. You can call the DescribeRegions operation to query the most recent region list. | 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
ClientToken | string | No | Specifies whether to query the resource properties. Valid values:
| 123e4567-e89b-12d3-a456-42665544**** |
RegionId | string | Yes | The logical ID of the resource defined in the template. | cn-hangzhou |
ShowResourceAttributes | boolean | No | The name of resource property N that you want to query. | true |
LogicalResourceId | string | Yes | The name of resource property N that you want to query. Note
Maximum value of N: 20.
| WebServer |
ResourceAttributes | array | No | The status of the resource. Valid values:
| |
string | No | The description of the resource. | InstanceId |
The operation that you want to perform. Set the value to GetStackResource.
Response parameters
The ID of the stack.
Examples
Sample success responses
JSON
format
{
"Status": "CREATE_COMPLETE",
"Description": "no description",
"RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6",
"StatusReason": "state changed",
"PhysicalResourceId": "d04af923-e6b7-4272-aeaa-47ec9777****",
"CreateTime": "2019-08-01T06:01:23",
"Metadata": {
"key": "value"
},
"ResourceType": "ALIYUN::ROS::WaitConditionHandle",
"ResourceAttributes": [
[
{
"ResourceAttributeKey": "CurlCli",
"ResourceAttributeValue": "curl -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'x-acs-region-id: cn-beijing' http://192.168.XX.XX/waitcondition?stackname=test-describe-resource\\&stackid=efdf5c10-96a5-4fd7-ab89-68e7baa2****\\&resource=WaitConditionHandle\\&expire=156468****\\&signature=991d910a901a89db6580d74233119960c004****"
}
]
],
"LogicalResourceId": "WebServer",
"ResourceDriftStatus": "IN_SYNC",
"UpdateTime": "2019-08-01T06:01:29",
"DriftDetectionTime": "2020-02-27T07:47:47",
"StackName": "test-describe-resource",
"StackId": "efdf5c10-96a5-4fd7-ab89-68e7baa2****",
"ModuleInfo": {
"LogicalIdHierarchy": "moduleA/moduleB\n",
"TypeHierarchy": "MODULE::ROS::Parent::Example/MODULE::ROS::Child::Example"
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-05-10 | The response structure of the API has changed | View Change Details |