将域名与 VPC 关联或取消关联。该 API 为增量操作。
请求频率:每秒最多调用 10 次。
该 API 已废弃,推荐您使用 UpdateBindVPC。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
const columns = [
{
width: '20%',
title: '参数',
dataIndex: 'Name',
className: 'openapi-doc-parameter-table-name'
},
{
width: 130,
title: '类型',
dataIndex: 'DataType',
className: 'openapi-doc-parameter-table-type'
},
{
width: 90,
title: '是否必填',
dataIndex: 'IsRequired',
className: 'openapi-doc-parameter-table-required'
},
{
width: '20%',
title: '示例值',
dataIndex: 'Example',
className: 'openapi-doc-parameter-table-example'
},
{
title: '描述',
dataIndex: 'Description',
className: 'openapi-doc-parameter-table-description'
},
];
const data = [
{
rowKey: '->Action',
Name: 'Action',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"IncBindVPC"} />,
Description: <RenderMd content={"要执行的操作,取值:IncBindVPC。"} />,
children: [
]
},
{
rowKey: '->Version',
Name: 'Version',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"2022-06-01"} />,
Description: <RenderMd content={"API的版本,取值:2022-06-01。"} />,
children: [
]
},
{
rowKey: '->ZID',
Name: 'ZID',
DataType: 'Long',
IsRequired: '是',
Example: <RenderMd content={"1013"} />,
Description: <RenderMd content={"标识域名的唯一 ID。您可以通过以下 API 获取:\n\n- [添加域名 API](https://www.volcengine.com/docs/6758/163105)\n- [获取域名列表 API](https://www.volcengine.com/docs/6758/163111)"} />,
children: [
]
},
{
rowKey: '->VpcTrns',
Name: 'VpcTrns',
DataType: 'Array of String',
IsRequired: '否',
Example: <RenderMd content={"[\"trn:vpc:cn-beijing:12345678:vpc/vpc-3reow******hxad79k\"]"} />,
Description: <RenderMd content={"域名所关联的一个或多个 VPC 的 [TRN](https://www.volcengine.com/docs/6257/1134319)。格式为 `trn:vpc:region:accountId:vpc/vpcId`。如果您需要验证子用户是否对域名关联的 VPC 所在的项目有操作权限,您需要传入该参数。"} />,
children: [
]
},
{
rowKey: '->Binds',
Name: 'Binds',
DataType: 'Array of Object',
IsRequired: '否',
Example: <RenderMd content={"无"} />,
Description: <RenderMd content={"与域名关联的一个或多个 VPC。您需要关联至少一个 VPC。IncBindVPC API 支持关联当前火山引擎账号下的 VPC 或跨账号关联 VPC。"} />,
children: [
{
rowKey: '->Binds->VpcId',
Name: 'VpcId',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"vpc-2d6si87atfh1c58ozfd0nzq8k\n\n"} />,
Description: <RenderMd content={"VPC 的 ID。"} />,
children: [
]
},
{
rowKey: '->Binds->Region',
Name: 'Region',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"cn-beijing"} />,
Description: <RenderMd content={"VPC 的地域。"} />,
children: [
]
},
]
},
{
rowKey: '->Unbinds',
Name: 'Unbinds',
DataType: 'Array of Object',
IsRequired: '否',
Example: <RenderMd content={"无"} />,
Description: <RenderMd content={"与域名解除关联的一个或多个 VPC。如果该域名仅关联了一个 VPC,您无法解除关联。"} />,
children: [
{
rowKey: '->Unbinds->VpcId',
Name: 'VpcId',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"vpc-2d6si87atfh1c58ozfd0nzq8k\n\n"} />,
Description: <RenderMd content={"VPC 的 ID。"} />,
children: [
]
},
{
rowKey: '->Unbinds->Region',
Name: 'Region',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"cn-beijing"} />,
Description: <RenderMd content={"VPC 的地域。"} />,
children: [
]
},
]
},
];
return (<Table
rowKey="rowKey"
className="openapi-doc-parameter-table"
columns={columns}
data={data}
border={ { cell: true, wrapper: true } }
scroll={ { x: "auto" } }
pagination={false}
/>);
本接口无特有的返回参数。更多信息请见返回结构。
POST https://private-zone.volcengineapi.com/?Action=IncBindVPC&Version=2022-06-01
{
"ZID": 1013,
"Binds": [
{
"VpcId": "vpc-2d6si87atfh1c58ozfd0nzq8k",
"Region": "cn-beijing"
}
]
}
{
"ResponseMetadata": {
"RequestId": "20221214140553EC822FFD341E9C19EF59",
"Action": "IncBindVPC",
"Version": "2022-06-01",
"Service": "private_zone",
"Region": "cn-beijing"
}
}
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
const columns = [
{
title: '状态码',
dataIndex: 'HttpCode',
width: '12%',
className: 'openapi-doc-errorcode-table-httpcode'
},
{
title: '错误码',
dataIndex: 'ErrorCode',
width: '22%',
className: 'openapi-doc-errorcode-table-errorcode'
},
{
title: '错误信息',
dataIndex: 'ErrorMessage',
width: '33%',
className: 'openapi-doc-errorcode-table-errormessage'
},
{
title: '说明',
dataIndex: 'Description',
width: '33%',
className: 'openapi-doc-errorcode-table-description'
},
];
const data = [
{
HttpCode: 400,
ErrorCode: 'ErrRegionNotSupport',
ErrorMessage: <RenderMd content={"%s of [%s] not supported by private_zone"} />,
Description: <RenderMd content={"private_zone不支持[%s]地域的%s"} />,
},
{
HttpCode: 400,
ErrorCode: 'ErrParamInvalid',
ErrorMessage: <RenderMd content={"validation fail: params:[%s] , value:[%v]"} />,
Description: <RenderMd content={"参数校验失败"} />,
},
{
HttpCode: 400,
ErrorCode: 'ErrQuotaExceeded',
ErrorMessage: <RenderMd content={"[%s] exceeds quota [%d]"} />,
Description: <RenderMd content={"[%s] 超出限额 [%d]\n"} />,
},
{
HttpCode: 400,
ErrorCode: 'ErrSubnetVPCChange',
ErrorMessage: <RenderMd content={"zone in subnet mode is not allowed to change vpc bind"} />,
Description: <RenderMd content={"开启智能解析的域名无法变更关联的 VPC"} />,
},
{
HttpCode: 400,
ErrorCode: 'ErrOperationForbidden',
ErrorMessage: <RenderMd content={"operation forbidden for global zone"} />,
Description: <RenderMd content={"全局域名禁止当前操作"} />,
},
{
HttpCode: 400,
ErrorCode: 'ErrZoneNotFound',
ErrorMessage: <RenderMd content={"zone not found"} />,
Description: <RenderMd content={"未找到域名"} />,
},
{
HttpCode: 500,
ErrorCode: 'ErrInternalServer',
ErrorMessage: <RenderMd content={"server internal error"} />,
Description: <RenderMd content={"服务内部错误"} />,
},
];
return (<Table
columns={columns}
data={data}
border={ { cell: true, wrapper: true } }
scroll={ { x: "auto" } }
pagination={false}
/>);