All Products
Search
Document Center

Virtual Private Cloud:CreateIpamPool

Last Updated:Dec 03, 2025

Creates an IPAM address pool.

Operation description

  • By default, you can create a maximum of one top-level public IPv6 pool per Internet Service Provider (ISP) type in each region.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:CreateIpamPool

create

*IpamPool

acs:vpc:{#regionId}:{#accountId}:ipamscope/*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the IPAM is managed. Call the DescribeRegions operation to obtain the region ID.

cn-hangzhou

IpamScopeId

string

Yes

The ID of the IPAM scope.

ipam-scope-glfmcyldpm8lsy****

IpamPoolName

string

No

The name of the IPAM address pool.

The name must be 1 to 128 characters in length and cannot start with http:// or https://.

abc

IpamPoolDescription

string

No

The description of the IPAM address pool.

The description must be 1 to 256 characters in length and must start with a letter or a Chinese character. It cannot start with http:// or https://. If you do not specify this parameter, the description is empty.

test description

ResourceGroupId

string

No

The ID of the resource group to which the IPAM address pool belongs.

rg-acfmxazb4ph6aiy****

PoolRegionId

string

No

The region where the IPAM address pool is available.

cn-hangzhou

SourceIpamPoolId

string

No

The ID of the source IPAM address pool.

Note

If you do not specify this parameter, a parent address pool is created.

ipam-pool-6rcq3tobayc20t****

AllocationDefaultCidrMask

integer

No

The default network mask for the allocations in the IPAM address pool.

Note

The network mask for an IPv4 address pool must be an integer from 0 to 32. The network mask for an IPv6 address pool must be an integer from 0 to 128.

28

AllocationMaxCidrMask

integer

No

The maximum network mask for the allocations in the IPAM address pool.

Note

The network mask for an IPv4 address pool must be an integer from 0 to 32. The network mask for an IPv6 address pool must be an integer from 0 to 128.

32

AllocationMinCidrMask

integer

No

The minimum network mask for the allocations in the IPAM address pool.

Note

The network mask for an IPv4 address pool must be an integer from 0 to 32. The network mask for an IPv6 address pool must be an integer from 0 to 128.

8

DryRun

boolean

No

Specifies whether to perform a dry run. Valid values:

  • true: sends a check request without creating the IPAM address pool. The system checks the required parameters, the request format, and the instance status. If the check fails, the corresponding error is returned. If the check passes, the `DryRunOperation` error code is returned.

  • false (default): sends a normal request. If the request passes the check, a 2xx HTTP status code is returned and the operation is performed.

false

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different 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 may be different for each request.

123e4567-e89b-12d3-a456-426655440000

IpVersion

string

No

The IP version. Valid values:

  • IPv4: IPv4.

  • IPv6: IPv6.

IPv4

Ipv6Isp

string

No

The line type of the IPv6 CIDR block. This parameter is valid only for public IPv6 address pools. Valid values:

  • BGP (default): Alibaba Cloud BGP IPv6.

  • ChinaMobile: China Mobile (single line).

  • ChinaUnicom: China Unicom (single line).

  • ChinaTelecom: China Telecom (single line).

Note

If you are a user on the single-line bandwidth whitelist, you can set this parameter to ChinaTelecom, ChinaUnicom, or ChinaMobile.

BGP

AutoImport

boolean

No

Specifies whether to enable the auto import feature for the address pool.

true

Tag

array<object>

No

The tags.

object

No

The tags.

Key

string

No

The tag key. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The tag key must start with a letter or a Chinese character, but cannot start with aliyun or acs:. The tag key cannot contain http:// or https://.

Note

You must specify at least one of the ResourceId.N or Tag.N (Tag.N.Key and Tag.N.Value) parameters.

FinanceDept

Value

string

No

The tag value. You can specify up to 20 tag values. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot contain http:// or https://.

Note

You must specify at least one of the ResourceId.N or Tag.N (Tag.N.Key and Tag.N.Value) parameters.

FinanceJoshua

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

BB2C39DE-CEB8-595A-981A-F2EFCBE7324E

IpamPoolId

string

The ID of the IPAM address pool.

ipam-pool-6rcq3tobayc20t****

Examples

Success response

JSON format

{
  "RequestId": "BB2C39DE-CEB8-595A-981A-F2EFCBE7324E",
  "IpamPoolId": "ipam-pool-6rcq3tobayc20t****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 ResourceNotFound.IpamScope The specified resource of IPAM scope is not found. The input IPAM scope does not exist.
400 ResourceNotFound.SourceIpamPool The dependent source IPAM pool is not found. The dependent resource source IPAM Pool does not exist.
400 UnsupportedFeature.PublicIpamScopeType The feature of PublicIpamScopeType is not supported. The IPAM you specified does not support the creation of public scope.
400 IllegalParam.AllocationDefaultNetmask The specified AllocationDefaultNetmask is illegal. AllocationDefaultNetmask parameter is illegal.
400 IllegalParam.AllocationMaxNetmask The specified AllocationMaxNetmask is illegal. AllocationMaxNetmask parameter is illegal.
400 IllegalParam.AllocationMinNetmask The specified AllocationMinNetmask is illegal. AllocationMinNetmask parameter is illegal.
400 IllegalParam.IpVersion The specified IpVersion is illegal. Invalid IpVersion.
400 QuotaExceeded.IpamPoolQuotaDepth The quota of IpamPoolQuotaDepth count is exceeded. Maximum number of IPAM address pool depth allowed exceeds limit
400 ResourceNotFound.Ipam The specified resource of ipam is not found. The IPAM entered does not exist.
400 IllegalParam.PoolRegionId The specified PoolRegionId is illegal. PoolRegionId parameter is illegal.
400 QuotaExceeded.IpamSubPoolQuotaPerIpamPool The quota of ipamSubPoolQuotaPerIpamPool count is exceeded. The number of sub-pools for the IPAM pool exceeds the limit.
400 DryRunOperation Request validation has been passed with DryRun flag set.
400 IncorrectStatus.IpamPool The status of the IPAM pool is incorrect. The status of the IPAM pool is incorrect.
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 UnsupportedFeature.IpamPublicIpv4Pool The feature of public IPv4 pool is not supported in IPAM. The feature of public IPv4 pool is not supported in IPAM.
400 OperationDenied.IpamPublicIpv6PoolNeedPoolRegion The public IPv6 pool cannot be created in IPAM when its pool region is empty. The public IPv6 pool cannot be created in IPAM when its pool region is empty.
400 IllegalParam.Ipv6Isp The specified Ipv6Isp is illegal. The specified Ipv6Isp is illegal.
400 UnsupportedFeature.Ipv6Isp The Ipv6Isp feature is not supported. The Ipv6Isp feature is not supported.
400 UnsupportedRegion.Ipv6Isp The current region does not support this feature. The current region does not support this feature.
400 QuotaExceeded.IpamPublicIpv6TopPoolQuotaPerRegionIsp The number of public IPv6 top pool in IPAM for this ISP owned by the user in this region exceeds the limit. The number of public IPv6 top pool in IPAM for this ISP owned by the user in this region exceeds the limit.
400 Mismatch.IpamScopeAndSourceIpamPool The input source IPAM pool is not in the input IPAM scope. The input source IPAM pool is not in the input IPAM scope.
400 Mismatch.Ipv6IspAndSourceIpamPool The input Ipv6Isp is inconsistent with the Ipv6Isp of the input source IPAM pool. The input Ipv6Isp is inconsistent with the Ipv6Isp of the input source IPAM pool.
400 UnsupportedFeature.IpamIpv6 The feature of IPv6 is not supported in this region. The feature of IPv6 is not supported in this region.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.