调用ListSecurityGroups查询指定集群绑定的安全组列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListSecurityGroups |
系统规定参数。取值:ListSecurityGroups |
ClusterId | String | 是 | ehpc-hz-FYUr32**** |
集群ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 6D9A3378-61CA-4415-BEB0-1168C2A15975 |
请求ID。 |
SecurityGroups | List | ["sg-bp13n61xsydodfyg****"] |
安全组ID。 |
TotalCount | Integer | 1 |
集群的安全组总个数。 |
示例
请求示例
https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListSecurityGroups
&ClusterId=ehpc-hz-FYUr32****
&<公共请求参数>
正常返回示例
XML
格式
<ListSecurityGroupsResponse>
<SecurityGroups>
<SecurityGroup>sg-bp13n61xsydodfyg****</SecurityGroup>
</SecurityGroups>
<TotalCount>1</TotalCount>
<RequestId>6D9A3378-61CA-4415-BEB0-1168C2A15975</RequestId>
</ListSecurityGroupsResponse>
JSON
格式
{
"SecurityGroups": {
"SecurityGroup": [
"sg-bp13n61xsydodfyg****"
]
},
"TotalCount": 1,
"RequestId": "6D9A3378-61CA-4415-BEB0-1168C2A15975"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | 无效的参数: %s |
404 | ClusterNotFound | The specified cluster does not exist. | 指定的集群不存在,请您检查该参数是否正确。 |
407 | NotAuthorized | You are not authorized by RAM for this request. | 此请求未获得RAM授权 |
406 | EcsError | ECS api request error | ECS接口失败 |
406 | DbError | A database service error occurred. | 数据库请求失败 |
406 | AliyunError | Aliyun api service error | 其他云产品接口请求失败 |
500 | UnknownError | An unknown error occurred. | 未知错误 |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | 请求失败,服务暂时不可用 |
访问错误中心查看更多错误码。