Queries the list of security groups that are attached to a specified cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListSecurityGroups |
The operation that you want to perform. Set the value to ListSecurityGroups. |
ClusterId | String | Yes | ehpc-hz-FYUr32**** |
The ID of the cluster. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 6D9A3378-61CA-4415-BEB0-1168C2A15975 |
The ID of the request. |
SecurityGroups | List | ["sg-bp13n61xsydodfyg****"] |
The ID of the security group. |
TotalCount | Integer | 1 |
The number of security groups that are associated with the cluster. |
Examples
Sample requests
https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListSecurityGroups
&ClusterId=ehpc-hz-FYUr32****
&<Common request parameters>
Sample success responses
XML
format
<ListSecurityGroupsResponse>
<SecurityGroups>
<SecurityGroup>sg-bp13n61xsydodfyg****</SecurityGroup>
</SecurityGroups>
<TotalCount>1</TotalCount>
<RequestId>6D9A3378-61CA-4415-BEB0-1168C2A15975</RequestId>
</ListSecurityGroupsResponse>
JSON
format
{
"SecurityGroups": {
"SecurityGroup": [
"sg-bp13n61xsydodfyg****"
]
},
"TotalCount": 1,
"RequestId": "6D9A3378-61CA-4415-BEB0-1168C2A15975"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | The error message returned because the specified parameter %s is invalid. |
404 | ClusterNotFound | The specified cluster does not exist. | The error message returned because the specified cluster does not exist. |
407 | NotAuthorized | You are not authorized by RAM for this request. | The error message returned because you are not authorized by RAM for this request. |
406 | EcsError | ECS api request error | The error message returned because the operation failed to call the ECS service. |
406 | DbError | A database service error occurred. | The error message returned because the database request has failed. |
406 | AliyunError | Aliyun api service error | The error message returned because the operation failed to call other services. |
500 | UnknownError | An unknown error occurred. | The error message returned because an unknown error has occurred. |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The error message returned because the request has failed. The server is temporarily unavailable. |
For a list of error codes, visit the API Error Center.