Provisions a CIDR block for an IPAM pool.
Operation description
Before you provision a CIDR block, you must create an IPAM pool by calling the CreateIpamPool operation.
You cannot provision a CIDR block for a child pool if its parent pool does not have a provisioned CIDR block.
If a parent pool has a provisioned CIDR block, you can provision a CIDR block for its child pool. The CIDR block of the child pool must be a subset of the CIDR block of the parent pool.
If a parent pool has a provisioned CIDR block and a CIDR allocation, the CIDR block that you provision for a child pool cannot conflict with the existing CIDR allocation.
Requests to provision a CIDR block for an IPAM pool must be sent from the managed region of the IPAM.
The CIDR block that you provision for an IPAM pool cannot conflict with the CIDR blocks provisioned for other pools that have the same applicable scope.
The number of provisioned CIDR blocks for an IPAM pool is limited. By default, a top-level public IPv6 pool can have a maximum of one provisioned CIDR block. Other types of pools can have a maximum of 50 provisioned CIDR blocks.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
vpc:AddIpamPoolCidr | update | *All Resource
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
RegionId | string | Yes | The ID of the hosted region of the IPAM. Call DescribeRegions to get the region ID. | cn-hangzhou |
IpamPoolId | string | Yes | The instance ID of the IPAM pool. | ipam-pool-6rcq3tobayc20t**** |
Cidr | string | No | The CIDR block to provision. Note Provision a CIDR block for a top-level private pool only by entering a CIDR block. | 192.168.1.0/24 |
NetmaskLength | integer | No | The subnet mask of the CIDR block. Note Provision a CIDR block for a top-level public IPv6 pool only by entering a mask. | 24 |
DryRun | boolean | No | Specifies whether to perform a dry run. Valid values:
| false |
ClientToken | string | No | A client token that is used to ensure the idempotence of the request. Use the client to generate the token, but make sure that the token is unique among requests. The token can contain only ASCII characters. Note If you do not specify this parameter, the system automatically uses the RequestId of the request as the ClientToken. The RequestId of each API request may be different. | 123e4567-e89b-12d3-a456-426655440000 |
Response elements
Element | Type | Description | Example |
object | BaseResult | ||
RequestId | string | The request ID. | 558BC336-8B88-53B0-B4AD-980EE900AB01 |
Cidr | string | The CIDR block that is successfully provisioned for the IPAM pool. | 192.168.1.0/24 |
Examples
Success response
JSON format
{
"RequestId": "558BC336-8B88-53B0-B4AD-980EE900AB01",
"Cidr": "192.168.1.0/24"
}Error codes
HTTP status code | Error code | Error message | Description |
400 | IllegalParam.IpVersion | The specified IpVersion is illegal. | Invalid IpVersion. |
400 | UnsupportedFeature.PublicIpamScopeType | The feature of PublicIpamScopeType is not supported. | The IPAM you specified does not support the creation of public scope. |
400 | IllegalParam.IpamPool | The specified IPAM pool cannot be empty. | The IPAM pool cannot be empty. |
400 | OperationDenied.PoolRegionNotSupportAddPoolCidr | The operation is not allowed because pool region does not support adding CIDR. | The operation was not allowed because the operation to add CIDR could not be performed in the region. |
400 | OperationDenied.CidrConflictWithTopCidrs | The operation is not allowed because the input CIDR conflicts with existing top CIDRs. | The operation is not allowed because the input CIDR conflicts with existing top CIDRs. |
400 | OperationDenied.SourceCidrIsNull | The operation is not allowed because the source CIDR is null. | The parent pool does not have a CIDR block. |
400 | OperationDenied.CidrNotInSourceCidr | The operation is not allowed because the input CIDR is not in source CIDR. | The specified CIDR block does not fall within the CIDR range of the parent pool. |
400 | ResourceNotFound.SourceIpamPool | The dependent source IPAM pool is not found. | The dependent resource source IPAM Pool does not exist. |
400 | OperationDenied.CidrConflictWithExistAllocation | The operation is not allowed because the input CIDR conflicts with the existing allocation. | The specified CIDR block conflicts with an existing CIDR block. |
400 | DryRunOperation | Request validation has been passed with DryRun flag set. | |
400 | IllegalParam.Cidr | The specified CIDR is illegal. | The CIDR block is invalid. |
400 | QuotaExceeded.IpamCidrQuotaPerIpamPool | The quota of ipamCidrQuotaPerIpamPool count is exceeded. | The number of CIDR blocks in the IPAM pool exceeds the upper limit. |
400 | OperationDenied.OperateShareResource | The operation is not allowed because the instance is a shared resource. | The operation is not allowed because the instance is a shared resource. |
400 | IncorrectStatus.IpamPool | The status of the IPAM pool is incorrect. | The status of the IPAM pool is incorrect. |
400 | MissingParam.CidrOrNetmaskLength | The Cidr or NetmaskLength must be input. | The Cidr or NetmaskLength must be input. |
400 | Mismatch.CidrAndPoolIpVersion | The ip verion of input Cidr is inconsistent with that of the input IPAM pool. | The ip verion of input Cidr is inconsistent with that of the input IPAM pool. |
400 | Mismatch.CidrAndNetmaskLength | The mask of the input Cidr is inconsistent with the input NetmaskLength. | The mask of the input Cidr is inconsistent with the input NetmaskLength. |
400 | MissingParam.Cidr | The Cidr must be input when adding CIDR for IPAM private top pool. | The Cidr must be input when adding CIDR for IPAM private top pool. |
400 | UnsupportedFeature.AddCidrForIpamPrivateIpv6Pool | Adding CIDR for IPAM private IPv6 pool is not supported for this user. | Adding CIDR for IPAM private IPv6 pool is not supported for this user. |
400 | UnsupportedFeature.AddUlaCidrForIpamPublicIpv6Pool | Adding ULA CIDR for IPAM public IPv6 pool is not supported. | Adding ULA CIDR for IPAM public IPv6 pool is not supported. |
400 | IllegalParam.NetmaskLength | The specified NetmaskLength is illegal. | The specified NetmaskLength is illegal. |
400 | OperationDenied.CidrConflictWithOfficialGuaCidrs | The operation is not allowed because the input CIDR conflicts with official GUA CIDRs. | The operation is not allowed because the input CIDR conflicts with official GUA CIDRs. |
400 | OperationDenied.CidrUnavailableInPool | The operation is not allowed because the CIDR is unavailable in the IPAM pool. | The operation is not allowed because the CIDR is unavailable in the IPAM pool. |
400 | OperationDenied.AvailableCidrInsufficient | The operation is not allowed because available CIDR is insufficient. | The operation is not allowed because available CIDR is insufficient. |
400 | OperationDenied.OfficialCidrInsufficient | The operation is not allowed because the official CIDR is insufficient. | The operation is not allowed because the official CIDR is insufficient. |
400 | OperationDenied.OfficialCidrUnavailable | The operation is not allowed because the official CIDR is unavailable. | The operation is not allowed because the official CIDR is unavailable. |
400 | OperationDenied.OfficialCidrTmpUnavailable | The operation is not allowed because the official CIDR is temporarily unavailable. | The operation is not allowed because the official CIDR is temporarily unavailable. |
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. | The IPAM pool does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.