You can call this operation to query all resources in a deployment environment.
Debugging
Request headers
This operation uses common request headers, instead of special request headers. For more information, see the "Common request headers" section in "Common request and response headers."
Request syntax
GET /pop/v1/wam/envResource HTTP/1.1
Request parameters
Parameter | Type | Required? | Example | Description |
---|---|---|---|---|
EnvId | String | Yes | we-5d22f93dcd04d705b65***** |
The ID of the deployment environment in which you want to query resources. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | OK |
The response code. The value is OK if the request is successful. |
EnvResource |
The information about resources in the deployment environment. |
||
EnvId | String | we-5d22f93dcd04d705b65***** |
The ID of the deployment environment. |
EnvName | String | test1 |
The name of the deployment environment. |
Instances |
The list of ECS instances in the deployment environment. |
||
Id | String | i-wz9ci3y5rx4ub93***** |
The ID of the ECS instance. |
LaunchConfigurationId | String | "" |
The ID of the launch configuration. |
LaunchTemplateId | String | "" |
The ID of the launch template. |
LoadBalancers |
The list of SLB resources in the deployment environment. |
||
AddressType | String | "" |
The address type of the SLB instance. |
Id | String | "" |
The ID of the SLB instance. |
Port | Integer | 1001 |
The port used by the SLB instance. |
Protocol | String | "" |
The protocol used by the SLB instance. |
MonitorGroup |
The information about the resource monitoring group. |
||
Id | String | 71***** |
The ID of the resource monitoring group. |
ScalingGroup |
The information about the auto scaling group. |
||
Id | String | asg-wz9aaa7g5ff6fiw***** |
The ID of the auto scaling group. |
SecurityGroups |
The list of security groups. |
||
Id | String | sg-wz9b6zjhne81unz***** |
The ID of the security group. |
VSwitches |
The list of VSwitches. |
||
Id | String | vsw-wz9gfawx1vxkimtj***** |
The ID of the VSwitch. |
Vpc |
The VPC information. |
||
Id | String | vpc-wz9e6y22o3o91nuy***** |
The ID of the VPC. |
Message | String | success |
The response message. The value is success if the request is successful. |
RequestId | String | 71CC3AA5-17C9-465F-8F8A-0B6BE58***** |
The ID of the request. |
Examples
Sample request
http://webplus.cn-hangzhou.aliyuncs.com/pop/v1/wam/envResource?ServiceCode=webx&EnvId=we-5d244085f314934e2ab*****&<Common request parameters>
Sample success response
XML
format
<DescribeEnvResourceResponse>
<Message>success</Message>
<EnvResource>
<Vpc>
<Id>vpc-wz9e6y22o3o91nuy*****</Id>
</Vpc>
<VSwitches>
<VSwitch>
<Id>vsw-wz9gfawx1vxkimtj*****</Id>
</VSwitch>
</VSwitches>
<MonitorGroup>
<Id>71*****</Id>
</MonitorGroup>
<EnvName>test1</EnvName>
<EnvId>we-5d22f93dcd04d705b65*****</EnvId>
<ScalingGroup>
<Id>asg-wz9aaa7g5ff6fiw*****</Id>
</ScalingGroup>
<LoadBalancers></LoadBalancers>
<Instances>
<Instance>
<Id>i-wz9ci3y5rx4ub93*****</Id>
</Instance>
</Instances>
<SecurityGroups>
<SecurityGroup>
<Id>sg-wz9b6zjhne81unz*****</Id>
</SecurityGroup>
</SecurityGroups>
</EnvResource>
<RequestId>CA14B31B-4408-4B97-AB1E-78CECC5*****</RequestId>
<Code>OK</Code>
</DescribeEnvResourceResponse>
JSON
format
{
"Message":"success",
"EnvResource":{
"Vpc":{
"Id":"vpc-wz9e6y22o3o91nuy*****"
},
"VSwitches":{
"VSwitch":[
{
"Id":"vsw-wz9gfawx1vxkimtj*****"
}
]
},
"MonitorGroup":{
"Id":"71*****"
},
"EnvName":"test1",
"EnvId":"we-5d22f93dcd04d705b65*****",
"ScalingGroup":{
"Id":"asg-wz9aaa7g5ff6fiw*****"
},
"LoadBalancers":{
"LoadBalancer":[]
},
"Instances":{
"Instance":[
{
"Id":"i-wz9ci3y5rx4ub93*****"
}
]
},
"SecurityGroups":{
"SecurityGroup":[
{
"Id":"sg-wz9b6zjhne81unz*****"
}
]
}
},
"RequestId":"71CC3AA5-17C9-465F-8F8A-0B6BE58*****",
"Code":"OK"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | ResourceAuthFailed | The specified resource does not exist or it does not belong to this Alibaba Cloud account. | The error message returned because the specified resource does not exist or it does not belong to your Alibaba Cloud account. |
For more information about error codes, see API Error Center.