调用AddSecurityGroup将集群加入到指定的安全组。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ehpc:AddSecurityGroup |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ClusterId |
string |
是 |
集群 ID。 您可以通过调用 ListClusters 获取集群 ID。 |
ehpc-hz-FYUr32**** |
| SecurityGroupId |
string |
是 |
安全组 ID。 您可以调用 DescribeSecurityGroups 查询可以使用的安全组。 |
sg-bp13n61xsydodfyg**** |
| ClientToken |
string |
否 |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性。 |
123e4567-e89b-12d3-a456-426655440000 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
示例
正常返回示例
JSON格式
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidSecurityGroup | The security group ID is invalid. | |
| 400 | InvalidParams | The specified parameter %s is invalid. | 指定的参数 %s 无效。 |
| 500 | UnknownError | An unknown error occurred. | 未知错误 |
| 404 | SecurityGroupNotSupported | The security group is not supported. | 不支持的安全组 |
| 404 | SecurityGroupAlreadyExists | The security group already exists. | 安全组已存在 |
| 404 | ClusterNotFound | The specified cluster does not exist. | 指定的集群不存在,请您检查该参数是否正确。 |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | 请求失败,服务暂时不可用 |
| 406 | EcsError | ECS api request error | |
| 406 | DbError | A database service error occurred. | 数据库请求失败 |
| 406 | AliyunError | Aliyun api service error | |
| 407 | NotAuthorized | You are not authorized by RAM for this request. | 此请求未获得RAM授权 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?