All Products
Search
Document Center

Virtual Private Cloud:CreateIpamPool

Last Updated:Apr 07, 2025

Creates an IP Address Manager (IPAM) pool.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:CreateIpamPoolcreate
*IpamPool
acs:vpc:{#regionId}:{#accountId}:ipamscope/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the IPAM instance is hosted. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
IpamScopeIdstringYes

The ID of the IPAM scope.

ipam-scope-glfmcyldpm8lsy****
IpamPoolNamestringNo

The name of the IPAM pool.

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

abc
IpamPoolDescriptionstringNo

The description of the IPAM pool.

It must be 2 to 256 characters in length. It must start with a letter, but cannot start with a http:// or https://. This parameter is empty by default.

test description
ResourceGroupIdstringNo

The resource group ID.

rg-acfmxazb4ph6aiy****
PoolRegionIdstringNo

The effective region of the IPAM pool.

cn-hangzhou
SourceIpamPoolIdstringNo

The ID of the source IPAM pool.

Note If you do not specify this parameter, the pool is a parent pool.
ipam-pool-6rcq3tobayc20t****
AllocationDefaultCidrMaskintegerNo

The default network mask assigned to the IPAM pool.

An IPv4 mask must be 0 to 32 bits in length.

28
AllocationMaxCidrMaskintegerNo

The maximum network mask assigned to the IPAM pool.

An IPv4 mask must be 0 to 32 bits in length.

32
AllocationMinCidrMaskintegerNo

The minimum network mask assigned to the IPAM pool.

An IPv4 mask must be 0 to 32 bits in length.

8
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
false
ClientTokenstringNo

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 client token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
123e4567-e89b-12d3-a456-426655440000
IpVersionstringNo

The IP version. Only IPv4 is supported.

IPv4
AutoImportbooleanNo

Whether the pool has the auto-import feature enabled.

true
Tagarray<object>No

The tag list.

TagobjectNo
KeystringNo

The tag key. You can specify at most 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 letters, digits, periods (.), underscores (_), and hyphens (-). The tag key must start with a letter but cannot start with aliyun or acs:. The tag key cannot contain http:// or https://.

FinanceDept
ValuestringNo

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 can contain letters, digits, periods (.), underscores (_), and hyphens (-). It cannot start with a aliyun or acs:, and cannot contain http:// or https://.

FinanceJoshua

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

BB2C39DE-CEB8-595A-981A-F2EFCBE7324E
IpamPoolIdstring

The ID of the IPAM pool.

ipam-pool-6rcq3tobayc20t****

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400ResourceNotFound.IpamScopeThe specified resource of IPAM scope is not found.The input IPAM scope does not exist.
400ResourceNotFound.SourceIpamPoolThe dependent source IPAM pool is not found.The dependent resource source IPAM Pool does not exist.
400UnsupportedFeature.PublicIpamScopeTypeThe feature of PublicIpamScopeType is not supported.The IPAM you specified does not support the creation of public scope.
400IllegalParam.AllocationDefaultNetmaskThe specified AllocationDefaultNetmask is illegal.AllocationDefaultNetmask parameter is illegal.
400IllegalParam.AllocationMaxNetmaskThe specified AllocationMaxNetmask is illegal.AllocationMaxNetmask parameter is illegal.
400IllegalParam.AllocationMinNetmaskThe specified AllocationMinNetmask is illegal.AllocationMinNetmask parameter is illegal.
400IllegalParam.IpVersionThe specified IpVersion is illegal.Invalid IpVersion.
400QuotaExceeded.IpamPoolQuotaDepthThe quota of IpamPoolQuotaDepth count is exceeded.Maximum number of IPAM address pool depth allowed exceeds limit
400ResourceNotFound.IpamThe specified resource of ipam is not found.The IPAM entered does not exist.
400IllegalParam.PoolRegionIdThe specified PoolRegionId is illegal.PoolRegionId parameter is illegal.
400QuotaExceeded.IpamSubPoolQuotaPerIpamPoolThe quota of ipamSubPoolQuotaPerIpamPool count is exceeded.The number of sub-pools for the IPAM pool exceeds the limit.
400DryRunOperationRequest validation has been passed with DryRun flag set.-
400IncorrectStatus.IpamPoolThe status of the IPAM pool is incorrect.The status of the IPAM pool is incorrect.
400OperationDenied.OperateShareResourceThe operation is not allowed because the instance is a shared resource.The operation is not allowed because the instance is a shared resource.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-12-19The Error code has changed. The request parameters of the API has changedView Change Details
2024-09-12The Error code has changed. The request parameters of the API has changedView Change Details