为IPAM地址池预置CIDR地址段。
接口说明
预置 CIDR 前,请确保您已经创建了 IPAM 地址池。您可以通过调用 CreateIpamPool 创建地址池。
若父地址池没有预置 CIDR,则子地址池不支持预置 CIDR。
若父地址池预置了 CIDR,则子地址池可以预置 CIDR 且预置的 CIDR 必须是父地址池预置 CIDR 的子集。
若父地址池预置了 CIDR 同时也创建了 CIDR 分配,则子地址池预置的 CIDR 不能和已创建的 CIDR 分配冲突。
为地址池预置 CIDR 地址段的请求需要从 IPAM 托管地域发起。
为 IPAM 地址池预置的 CIDR 不能和相同作用范围内其他地址池预置的 CIDR 冲突。
地址池预置 CIDR 的数量存在限制,公网 IPv6 顶级池默认最多为 1 个,其余类型的地址池默认最多为 50 个。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
vpc:AddIpamPoolCidr |
update |
*全部资源
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
RegionId |
string |
是 |
IPAM 托管地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-hangzhou |
IpamPoolId |
string |
是 |
IPAM 地址池的实例 ID。 |
ipam-pool-6rcq3tobayc20t**** |
Cidr |
string |
否 |
要预置的 CIDR 地址段。 说明
私网顶级池仅支持通过输入 CIDR 地址段的方式进行预置。 |
192.168.1.0/24 |
NetmaskLength |
integer |
否 |
通过掩码的方式预置 CIDR 地址段。 说明
公网 IPv6 顶级池仅支持通过掩码的方式进行预置。 |
24 |
DryRun |
boolean |
否 |
是否只预检此次请求。取值:
|
false |
ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
123e4567-e89b-12d3-a456-426655440000 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
BaseResult |
||
RequestId |
string |
请求 ID。 |
558BC336-8B88-53B0-B4AD-980EE900AB01 |
Cidr |
string |
地址池成功预置的 CIDR 地址段。 |
192.168.1.0/24 |
示例
正常返回示例
JSON
格式
{
"RequestId": "558BC336-8B88-53B0-B4AD-980EE900AB01",
"Cidr": "192.168.1.0/24"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | IllegalParam.IpVersion | The specified IpVersion is illegal. | IpVersion参数不合法。 |
400 | UnsupportedFeature.PublicIpamScopeType | The feature of PublicIpamScopeType is not supported. | 您指定的IPAM暂不支持创建Public类型的作用范围。 |
400 | IllegalParam.IpamPool | The specified IPAM pool cannot be empty. | IPAM Pool不可以为空。 |
400 | OperationDenied.PoolRegionNotSupportAddPoolCidr | The operation is not allowed because pool region does not support adding CIDR. | 操作被拒绝,因为无法在该地域执行添加地址池CIDR的操作。 |
400 | OperationDenied.CidrConflictWithTopCidrs | The operation is not allowed because the input CIDR conflicts with existing top CIDRs. | 操作被拒绝,因为输入的CIDR与已存在的顶级池CIDR冲突。 |
400 | OperationDenied.SourceCidrIsNull | The operation is not allowed because the source CIDR is null. | 操作被拒绝,因为父地址池没有CIDR. |
400 | OperationDenied.CidrNotInSourceCidr | The operation is not allowed because the input CIDR is not in source CIDR. | 操作被拒绝,因为输入的CIDR不在父池CIDR的范围内。 |
400 | ResourceNotFound.SourceIpamPool | The dependent source IPAM pool is not found. | 依赖资源源IPAM Pool不存在。 |
400 | OperationDenied.CidrConflictWithExistAllocation | The operation is not allowed because the input CIDR conflicts with the existing allocation. | 操作被拒绝,因为输入的CIDR与已分配的CIDR冲突。 |
400 | DryRunOperation | Request validation has been passed with DryRun flag set. | DryRun校验通过。 |
400 | IllegalParam.Cidr | The specified CIDR is illegal. | 指定的CIDR不合法。 |
400 | QuotaExceeded.IpamCidrQuotaPerIpamPool | The quota of ipamCidrQuotaPerIpamPool count is exceeded. | IPAM地址池允许的CIDR数量超过限制。 |
400 | OperationDenied.OperateShareResource | The operation is not allowed because the instance is a shared resource. | 该实例是共享资源,不允许操作。 |
400 | IncorrectStatus.IpamPool | The status of the IPAM pool is incorrect. | IPAM地址池的状态不正确。 |
400 | MissingParam.CidrOrNetmaskLength | The Cidr or NetmaskLength must be input. | 为IPAM地址池预置地址段时,请输入Cidr或NetmaskLength。 |
400 | Mismatch.CidrAndPoolIpVersion | The ip verion of input Cidr is inconsistent with that of the input IPAM pool. | 输入的Cidr的IP地址协议版本与输入的IPAM地址池的IP地址协议版本不一致。 |
400 | Mismatch.CidrAndNetmaskLength | The mask of the input Cidr is inconsistent with the input NetmaskLength. | 输入的Cidr的掩码值和输入的NetmaskLength不一致。 |
400 | MissingParam.Cidr | The Cidr must be input when adding CIDR for IPAM private top pool. | 为IPAM私网顶级池预置地址段时,请输入Cidr。 |
400 | UnsupportedFeature.AddCidrForIpamPrivateIpv6Pool | Adding CIDR for IPAM private IPv6 pool is not supported for this user. | 当前用户不支持为IPAM私网IPv6地址池预置地址段。 |
400 | UnsupportedFeature.AddUlaCidrForIpamPublicIpv6Pool | Adding ULA CIDR for IPAM public IPv6 pool is not supported. | 不允许为IPAM公网IPv6地址池预置ULA地址段。 |
400 | IllegalParam.NetmaskLength | The specified NetmaskLength is illegal. | NetmaskLength参数不合法。 |
400 | OperationDenied.CidrConflictWithOfficialGuaCidrs | The operation is not allowed because the input CIDR conflicts with official GUA CIDRs. | 操作被拒绝,因为输入的CIDR与官方GUA CIDR冲突。 |
400 | OperationDenied.CidrUnavailableInPool | The operation is not allowed because the CIDR is unavailable in the IPAM pool. | 操作被拒绝,原因是CIDR在IPAM地址池中不可用。 |
400 | OperationDenied.AvailableCidrInsufficient | The operation is not allowed because available CIDR is insufficient. | 操作被拒绝,原因是可用的CIDR资源不足。 |
400 | OperationDenied.OfficialCidrInsufficient | The operation is not allowed because the official CIDR is insufficient. | 操作被拒绝,原因是官方可用的CIDR资源不足。 |
400 | OperationDenied.OfficialCidrUnavailable | The operation is not allowed because the official CIDR is unavailable. | 操作被拒绝,原因是CIDR已被占用。 |
400 | OperationDenied.OfficialCidrTmpUnavailable | The operation is not allowed because the official CIDR is temporarily unavailable. | 操作被拒绝,原因是官方CIDR资源暂时不可用。 |
400 | UnsupportedFeature.AddUlaCidrForIpamPrivateIpv6Pool | Adding ULA CIDR for IPAM private IPv6 pool is not supported for this user. | |
400 | UnsupportedFeature.AddByoipCidrForIpamPrivateIpv6Pool | Adding BYOIP CIDR for IPAM private IPv6 pool is not supported for this user. | |
404 | ResourceNotFound.IpamPool | The dependent IPAM pool is not found. | 依赖资源IPAM Pool不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。