All Products
Search
Document Center

Virtual Private Cloud:CreateIpamPool

Last Updated:Oct 26, 2026

Creates an IPAM pool.

Operation description

  • By default, you can create a maximum of one public IPv6 top-level pool for each 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 hosted region for IPAM. You can call the DescribeRegions operation to query region IDs.

cn-hangzhou

IpamScopeId

string

Yes

The instance ID of the IPAM scope.

ipam-scope-glfmcyldpm8lsy****

IpamPoolName

string

No

The name of the IPAM 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 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. The default value is empty.

test description

ResourceGroupId

string

No

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

rg-acfmxazb4ph6aiy****

PoolRegionId

string

No

The region where the IPAM pool takes effect.

cn-hangzhou

SourceIpamPoolId

string

No

The instance ID of the source IPAM pool.

Note

If you do not specify this parameter, the pool to be created is a parent pool.

ipam-pool-6rcq3tobayc20t****

AllocationDefaultCidrMask

integer

No

The default network mask to allocate from the IPAM pool.

Note

Valid values for an IPv4 network mask: 0 to 32. Valid values for an IPv6 network mask: 0 to 128.

28

AllocationMaxCidrMask

integer

No

The maximum network mask to allocate from the IPAM pool.

Note

Valid values for an IPv4 network mask: 0 to 32. Valid values for an IPv6 network mask: 0 to 128.

32

AllocationMinCidrMask

integer

No

The minimum network mask to allocate from the IPAM pool.

Note

Valid values for an IPv4 network mask: 0 to 32. Valid values for an IPv6 network mask: 0 to 128.

8

DryRun

boolean

No

Specifies whether to only precheck the request. Valid values:

  • true: prechecks the request without creating the IPAM pool. The system checks whether required parameters are specified, the request format, and the instance status. If the request fails the precheck, an error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.

  • false (default): sends the request. If the request passes the precheck, an HTTP 2xx 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 value, but you must make sure that the value is unique among different requests. The client token can contain only ASCII characters.

Note

If you do not specify this parameter, the system automatically uses the RequestId of the API request as the client token. The RequestId of each API request is unique.

123e4567-e89b-12d3-a456-426655440000

IpVersion

string

No

The IP version. Valid values:

  • IPv4: IPv4.

  • IPv6: IPv6.

IPv4

Ipv6Isp

string

No

The ISP type of the IPv6 CIDR block. This parameter takes effect only for public IPv6 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 added to the whitelist for single-line bandwidth, you can set this parameter to ChinaTelecom, ChinaUnicom, or ChinaMobile.

BGP

AutoImport

boolean

No

Specifies whether to enable the automatic import feature for the pool.

true

Tag

array<object>

No

The tags.

object

No

The tags.

Key

string

No

The tag key of the resource. 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 must start with a letter or a Chinese character. It can contain digits, periods (.), underscores (_), and hyphens (-). It cannot start with aliyun or acs:, and cannot contain http:// or https://.

Note

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

FinanceDept

Value

string

No

The tag value of the resource. 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 and Tag.N (Tag.N.Key and Tag.N.Value) parameters.

FinanceJoshua

Response elements

Element

Type

Description

Example

object

The returned information.

RequestId

string

The request ID.

BB2C39DE-CEB8-595A-981A-F2EFCBE7324E

IpamPoolId

string

The instance ID of the IPAM 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. The DryRun validation passed.
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.
400 Mismatch.ChildIpVersionAndParentIpVersion The ChildIpVersion and ParentIpVersion are mismatched. The ChildIpVersion and ParentIpVersion are mismatched.
400 Mismatch.ChildPoolRegionAndParentPoolRegion The ChildPoolRegion and ParentPoolRegion are mismatched. The ChildPoolRegion and ParentPoolRegion are mismatched.
400 Mismatch.ChildIpamScopeAndParentIpamScope The ChildIpamScope and ParentIpamScope are mismatched. The ChildIpamScope and ParentIpamScope are mismatched.
400 Mismatch.ChildIpv6IspAndParentIpv6Isp The ChildIpv6Isp and ParentIpv6Isp are mismatched. The ChildIpv6Isp and ParentIpv6Isp are mismatched.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.