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

CreateCloudConnector

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

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

调用CreateCloudConnector创建云连接器。

请求参数

名称类型是否必选示例值描述
ActionStringCreateCloudConnector要执行的操作,取值:CreateCloudConnector。
VersionString2020-04-01API版本信息。
APNIdStringapn-1sdsf334j51288****运营商APN的ID。您可调用DescribeCloudConnectorAPNs查询APN信息。

CloudConnectorName

String

test-name

云连接器实例的名称。

  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、下划线(_)和中划线(-)。

  • 长度限制为1 ~ 128个字符。

  • 不填默认为云连接器实的ID。

Description

String

test-decription

云连接器实例的描述信息。

  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、空格( )、下划线(_)、中划线(-)、等号(=)、英文逗号(,)、中文逗号(,)、中文句号(。)。

  • 长度限制为0 ~ 255个字符。

  • 不填默认为空字符串。

VpcId

String

vpc-12wdsha83hd****

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

SubnetIds.N

String

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

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

  • 传入的2个子网应属于不同可用区,且应与运营商APN中子网的可用区相同,您可调用DescribeCloudConnectorAPNs查询APN信息。

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

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

ClientToken

String

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

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

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

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

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

返回数据

名称类型示例值描述

RequestId

String

0ED8D006-F706-4D23-88ED-E11ED28D****

请求ID。

OrderIdStringOrder242352525234503****订单ID。
CloudConnectorIdStringcc-1sdsf334j51288***云连接器实例ID。

请求示例

GET /?Action=CreateCloudConnector&Version=2020-04-01&APNId=apn-12b8o4l8zx7uo1**** HTTP/1.1
Host: open.volcengineapi.com
ServiceName: directconnect
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "20240103141456DA730AF2E67A0******",
        "Action": "CreateCloudConnector",
        "Version": "2020-04-01",
        "Service": "directconnect",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "20240103141456DA730AF2E67A0******",
        "CloudConnectorId": "cc-12bjay8vxvl6o17q7******",
        "OrderId": "Order7319751588244******"
    }
}

错误码

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

HttpCode错误码错误信息描述

400

DryRunOperation

Exception 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不足。

400

InvalidAPN.InvalidStatus

The specified APN is not in the correct status for the request.

指定的APN所处状态无法响应该请求。

400InvalidApn.DuplicateCreateThe specified APN has been used to create a cloud connector.指定的APN已经用于创建了云连接器。
400InvalidParameterA parameter specified in the request is not valid, is unsupported or cannot be used.该请求传入了非法或不支持的参数。
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.指定的子网属于同一个可用区。

400

InvalidSubnet.ZoneMismatch

The 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所处状态无法响应该请求。
400OrderErrorFailed to create an order in one step.创建订单并支付失败。

400

UnsupportedOperation

The request on the specified instance is denied due to the account balance and available vouchers are less than 100 yuan in total.

因账户余额及可用代金券共不足100元,对于该实例的操作请求被拒绝。

400

UnsupportedOperation

The request on the specified instance is denied due to the account in arrears status.

因账户处于欠费状态,对于该实例的操作请求被拒绝。

400InvalidDescription.MalformedThe specified description is malformed. Ensure the maximum length of description is 255.指定的描述格式不合法。描述长度不能超过255个字符。

400

InvalidDescription.Malformed

The specified description is malformed.

指定的描述格式不合法。请修复描述格式后重试。

400InvalidName.MalformedThe specified name is malformed. Ensure the maximum length of name is 128.指定的名称格式不合法。名称长度不能超过128个字符。
400InvalidName.MalformedThe specified name is malformed.指定的名称格式不合法。请修复名称格式后重试。
403ForbiddenYou are not authorized to perform operations on create cloud connector.无权限创建云连接器。
403InvalidCloudConnector.ServiceRoleNotAuthorizedThe service role for CloudConnector has not been authorized.当前账号尚未授权云连接器的服务角色。
404InvalidAPN.NotFoundThe specified APN does not exist.指定的APN不存在。
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.幂等请求处理中。