调用AttachResourceToVpcEndpointService接口,为终端节点服务添加服务资源。
接口说明
为终端节点服务添加服务资源之前,请确保终端节点服务处于 Active 状态,您可以通过调用 GetVpcEndpointServiceAttribute 接口,查询终端节点服务状态。
AttachResourceToVpcEndpointService 接口不支持在同一个终端节点服务实例下并发添加服务资源。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
privatelink:AttachResourceToVpcEndpointService |
update |
*VpcEndpointService
LoadBalancer
LoadBalancer
LoadBalancer
*NatGateway
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
要添加服务资源的终端节点服务所属的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
| ResourceType |
string |
是 |
服务资源类型。取值:
|
slb |
| ResourceId |
string |
是 |
服务资源 ID。 |
lb-hp32z1wp5peaoox2q**** |
| ZoneId |
string |
否 |
服务资源所属的可用区。服务资源为 ALB/NLB/GWLB 时,ZoneId 为需要填写。 |
cn-hangzhou-j |
| ServiceId |
string |
是 |
要添加服务资源的终端节点服务。 |
epsrv-hp3vpx8yqxblby3i**** |
| DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| RegionId |
string |
是 |
要添加服务资源的终端节点服务所属的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
示例
正常返回示例
JSON格式
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | EndpointServiceNotFound | The specified Service does not exist. | 当前终端节点服务不存在 |
| 400 | EndpointServiceOperationDenied | The specified operation of endpoint service is not allowed. | 终端节点服务处理中,不允许操作。 |
| 400 | EndpointServiceResourceExist | The specified resource already exists. | 终端节点服务下面的资源已经存在,请勿重复添加。 |
| 400 | LoadBalancerNotFound | The specified load balancer does not exist. | 负载均衡不存在。 |
| 400 | LoadBalancerNotSupportPrivateLink | The specified SLB does not support PrivateLink. | 当前负载均衡不支持Privatelink。 |
| 400 | AlbNotFound | The specified Alb does not exist. | ALI负载均衡不存在。 |
| 400 | EndpointServiceResourceTypeNotSupport | The specified resource type is not supported. | 终端节点服务资源类型不支持。 |
| 400 | QuotaMisMatched | The resource you applied for has exceeded the quota. | 申请的资源超过配额 |
| 400 | VSwitchNotFound | The specified VSwitch does not exist. | |
| 400 | ResourceNotFound.NatGateway | The specified resource %s is not found. | |
| 400 | Mismatch.ResourceType | The %s is mismatched for %s and %s. | %s在%s和%s中不匹配。 |
| 400 | EndpointServiceNotSupportedZone | The specified endpoint service does not support the zone. | 终端节点服务不支持当前可用区。 |
| 400 | ServiceResourceNotSupportIpv6 | The resource is not support ipv6. | 终端节点服务不支持IPv6 |
| 400 | EndpointServiceResourceTypeNotEqual | the service resource type not equal request type. | 请求中的resourceType与服务类型不一致 |
| 400 | OperationDenied.ServiceResourceIpVersionMismatch | The endpoint service and service resource AddressIpVersion do not match. | 终端节点服务与后端资源AddressIpVersion不匹配 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。