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

GrantInstanceToCen

最近更新时间2024.04.22 17:38:52

首次发布时间2022.04.28 07:28:31

调用 GrantInstanceToCen 接口,将指定的网络实例授权给跨账号的云企业网实例。

调试

请求参数

参数名称
类型
是否必选
示例值
描述
ActionStringGrantInstanceToCen要执行的操作,取值为GrantInstanceToCen。
VersionString2020-04-01API版本信息,当前版本为2020-04-01。
CenIdStringcen-7qthudw0ll6jmc****待授权云企业网实例的ID。您可以调用DescribeCens接口获取云企业网实例ID。
CenOwnerIdString210000****云企业网实例所属账号的ID。您可以调用DescribeCens接口获取账号ID。

InstanceType

String

VPC

网络实例的类型,取值如下:

  • VPC:私有网络。
  • DCGW:专线网关。

InstanceId

String

vpc-uf6o8d1dj8sjwxi6o****

待授权的网络实例的ID。

InstanceRegionIdStringcn-beijing网络实例所在的地域。

返回参数

参数名称
类型
示例值
描述
RequestIdString202111161611080102121461940900****请求ID。

请求示例

GET /?Action=GrantInstanceToCen&Version=2020-04-01&CenId=cen-7qthudw0ll6jmc****&CenOwnerId=210000****&InstanceId=vpc-uf6o8d1dj8sjwxi6o****&InstanceType=VPC&InstanceRegionId=cn-beijing HTTP/1.1
Host: open.volcengineapi.com
Service: cen
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202111161611080102121461940900****",
        "Action": "GrantInstanceToCen",
        "Version": "2020-04-01",
        "Service": "cen",
        "Region": "cn-beijing"
    },
    "Result": {}
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

http code错误码错误信息描述信息
400InvalidCenOwnerId.MalformedThe specified CenOwnerId is malformed.指定的云企业网实例所属账号ID不合法。
400InvalidCenAttachedInstance.MalformedThe specified instance type is malformed.指定的网络实例类型不支持。
400InvalidCenAttachedInstance.DcgwInvalidStatusSpecified direct connect gateway has been frozen.指定的专线网关已经被冻结。
400LimitExceeded.GrantVpcToCenYou've reached the limit on the number of CENs that a VPC can grant to.已达到指定私有网络可授权的云企业网实例数量上限。
400LimitExceeded.GrantDCGWToCenYou've reached the limit on the number of CENs that a DCGW can grant to.已达到指定专线网关可授权的云企业网实例数量上限。
404InvalidCen.NotFoundThe specified CEN does not exist.指定的云企业网实例不存在。
404InvalidVpcId.NotFoundThe specified VPC ID does not exist in this region.指定的地域内该私有网络不存在。
404InvalidDcgwId.NotFoundThe specified DCGW ID does not exist in this region.指定的地域内该专线网关不存在。
404InvalidCenRegion.NotFoundThe specified region does not exist.指定的地域不存在。
409InvalidCen.InvalidStatusThe specified CEN instance is not in the correct status for the request.指定的云企业网实例所处的状态无法响应该请求,请稍后再试。
409InvalidGrantInstance.ConflictThe specified instance has been granted.指定的网络实例已完成授权。
409InvalidGrantInstanceAccount.ConflictThe specified granted account is equal to the login account, please change the account to grant.指定的授权账号与当前账号相同,请更换账号授权。