调用AttachSecurityGroupToVpcEndpoint接口,将终端节点加入安全组。
接口说明
-
AttachSecurityGroupToVpcEndpoint 接口属于异步接口,即系统会返回一个请求 ID,但终端节点加入安全组尚未完成,系统后台添加任务仍在进行中。您可以调用 ListVpcEndpoints 查询终端节点的状态:
当终端节点处于 Pending 状态时,表示终端节点正在添加中。
当终端节点处于 Active 状态时,表示终端节点添加完成。
-
AttachSecurityGroupToVpcEndpoint 接口不支持将同一个终端节点实例并发加入安全组。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
privatelink:AttachSecurityGroupToVpcEndpoint |
update |
*VpcEndpoint
*SecurityGroup
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
要加入安全组的终端节点所属的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
eu-west-1 |
| SecurityGroupId |
string |
是 |
要加入的安全组的 ID。 |
sg-hp3c8qj1tyct90ej**** |
| EndpointId |
string |
是 |
要加入安全组的终端节点的 ID。 |
ep-hp33b2e43fays7s8**** |
| DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| RegionId |
string |
是 |
要加入安全组的终端节点所属的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
eu-west-1 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
8D778FF9-7640-4C13-BCD6-9265CA9A2F81 |
示例
正常返回示例
JSON格式
{
"RequestId": "8D778FF9-7640-4C13-BCD6-9265CA9A2F81"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | EndpointNotFound | The specified Endpoint does not exist. | 当前终端节点未找到。 |
| 400 | EndpointOperationDenied | The specified operation of endpoint is not allowed. | 当前终端节点正在处理中,不允许操作。 |
| 400 | EndpointLocked | The specified Endpoint is locked. | 当前终端节点已经被锁定。 |
| 400 | EndpointConnectionOperationDenied | The endpoint is being connected. | 终端节点连接正在处理中,不允许操作。 |
| 400 | SecurityGroupExist | The specified security group already exists. | 当前安全组已经存在。 |
| 400 | EndpointServiceDeleted | The specified Service is already deleted. | 终端节点服务已经被删除 |
| 400 | SecurityGroupNotFound | The specified security group does not exist. | 当前安全组未找到。 |
| 400 | SecurityGroupTypeNotSupport | The specified security group type is not supported. | 该安全组类型不支持 |
| 400 | SecurityGroupTypeOnlySingleTypeSupporteded | The specified security group only support one type. | 安全组只支持一种类型 |
| 400 | GatewayLoadBalancerNotSupportSecurityGroup | The gateway load balancer not support security group. | 网关型负载均衡类型不支持设置安全组 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。