You need to enable JavaScript to run this app.
导航

AssociateCloudConnector

最近更新时间2024.01.09 07:43:30

首次发布时间2024.01.09 07:43:30

调用AssociateCloudConnector为云连接器绑定VPC资源。

请求参数

名称类型是否必选示例值描述
ActionStringAssociateCloudConnector要执行的操作,取值:AssociateCloudConnector。
VersionString2020-04-01API版本信息。
CloudConnectorIdStringcc-1sdsf334j51288****云连接器实例ID。您可调用DescribeCloudConnectors查询云连接器实例ID。

VpcId

String

vpc-12wdsha83hd****

云连接器关联的VPC的ID。您可调用DescribeVpcs查询VPC的ID信息。
此VPC用于将云连接器网关和其他业务VPC通过跨账号ENI打通,请确保该VPC下子网数量不少于2个。

SubnetIds.N

Array

SubnetIds.1=subnet-xxds123****&SubnetIds.2=subnet-sdred9cl****

云连接器关联VPC下的子网的ID。您可调用DescribeSubnets查询子网的ID信息。

  • 参数 - N:表示子网ID的序号,数量上限为2个。

  • 如不填,则默认配置当前VPC下任意2个子网。

  • 多个子网ID间使用“&”分隔。

ClientToken

String

1456qwe-xsjs-123s-oies-1239s****

客户端Token,用于保证请求幂等性。

  • 由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。

  • 仅支持ASCII字符,且不能超过64个字符。

  • 若不传入ClientToken,则此次API调用不进行幂等校验。

返回数据

名称类型示例值描述
RequestIdString0ED8D006-F706-4D23-88ED-E11ED28D****请求ID。

请求示例

GET /?Action=AssociateCloudConnector&Version=2020-04-01&CloudConnectorId=cc-12bjay8vxvl6o17q7y2h*****&VpcId=vpc-2femkfaiigohs59gp67j*****&SubnetIds.1=subnet-imzfo1enkikg8gbssz*****&SubnetIds.2=subnet-12arter49yolc17q7y23***** HTTP/1.1
Host: open.volcengineapi.com
ServiceName: directconnect
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202401031427194B75B62AD5DA634******",
        "Action": "AssociateCloudConnector",
        "Version": "2020-04-01",
        "Service": "directconnect",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "202401031427194B75B62AD5DA634******",
    }
}

错误码

此处仅展示当前API的错误码,更多错误码请参见公共错误码

HttpCode错误码错误信息描述
400DependencyViolation.VPCThe specified cloud connector has an associated VPC. Please disassociate the VPC first.指定的云连接器有关联的VPC,请先解绑VPC。
400DryRunOperationException raised to indicate a successfully authorized action when the DryRun flag is set to true.该请求设置为DryRun操作,操作授权已获得许可,但未被实际执行。
400IdempotentParameterMismatchArguments on this idempotent request are inconsistent with arguments used in previous request(s).此幂等请求的参数与前一个请求中使用的参数不一致。
400InsufficientIpInSubnetThe specified subnet does not contain enough free private IP addresses to fulfill your request.指定子网下可用IP不足。
400InvalidAPN.InvalidStatusThe specified APN is not in the correct status for the request.指定的APN所处状态无法响应该请求。
400InvalidCloudConnector.InvalidBusinessStatusThe specified cloud connector is not in the correct status for the request. The specified cloud connector is frozen.指定的云连接器所处的状态无法响应该请求。当前云连接器被冻结。
400InvalidCloudConnector.InvalidStatusThe specified cloud connector is not in the correct status for the request.指定的云连接器所处的状态无法响应该请求。
400InvalidParameter.ClientTokenMalformedThe specified parameter ClientToken is malformed.指定的参数ClientToken格式不合法,长度不能超过64个ASCII字符。
400InvalidSubnet.NumberThe number of subnets is invalid.指定的子网数量不合法。
400InvalidSubnet.ZoneDuplicateThe specified subnets are in the same zone.指定的子网属于同一个可用区。
400InvalidSubnet.ZoneMismatchThe specified subnet is not in the same zone as the APN.指定的子网与APN所在可用区不匹配。
400InvalidVPC.SubnetMismatchThe specified VPC does not match the VPC of subnet.指定的VPC和子网所属的VPC不匹配。
400InvalidVpc.InvalidStatusThe specified VPC is not in the correct status for the request.指定的VPC所处状态无法响应该请求。
403InvalidCloudConnector.ServiceRoleNotAuthorizedThe service role for CloudConnector has not been authorized.当前账号尚未授权云连接器的服务角色。
404InvalidAPN.NotFoundThe specified APN does not exist.指定的APN不存在。
404InvalidCloudConnector.NotFoundThe specified cloud connector does not exist.指定的云连接器不存在。
404InvalidSubnet.NotFoundThe specified Subnet does not exist.指定的 Subnet 不存在。
404InvalidVPC.NotFoundThe specified VPC does not exist.指定的 VPC 不存在。
409InvalidIotCidr.ConflictThe specified CIDR block of IoT conflicts with the route entries in the system route table of VPC.指定的IoT的CIDR地址块与VPC中的系统路由表中的路由条目冲突。
412IdempotentProcessingThe request uses the same client token as a previous one that is still in process.幂等请求处理中。