ListIpamResourceCidrs

Updated at:

Queries resources within an IPAM scope.

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:ListIpamResourceCidrs

list

*IpamScope

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

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where IPAM is hosted.

You can call the DescribeRegions operation to query region IDs.

cn-hangzhou

IpamScopeId

string

No

The instance ID of the IPAM scope.

ipam-scope-glfmcyldpm8lsy****

IpamPoolId

string

No

Instance ID of the IPAM pool.

Note

IpamPoolId cannot be instance ID of a shared pool.

ipam-pool-6rcq3tobayc20t****

ResourceId

string

No

The ID of the resource.

vpc-bp16qjewdsunr41m1****

ResourceType

string

No

The type of the resource. Valid values:

  • VPC: VPC.

  • VSwitch: vSwitch.

VPC

NextToken

string

No

The pagination token for the next query. Valid values:

  • Leave this parameter empty for the first query or when no subsequent query is required.

  • For subsequent queries, set this parameter to the NextToken value returned by the previous API call.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

The maximum number of entries to return for a paginated query. Valid values: 1 to 100. Default value: 10.

10

VpcId

string

No

The instance ID of the VPC-connected instance to which the resource belongs.

vpc-bp1fjfnrg3av6zb9e****

Response elements

Element

Type

Description

Example

object

The list of returned information.

IpamResourceCidrs

array<object>

The list of resource information.

array<object>

The list of resource information.

AliUid

integer

The ID of the Alibaba Cloud account.

132193271328****

ResourceType

string

The type of the resource. Valid values:

  • VPC: VPC.

  • VSwitch: vSwitch.

VPC

ResourceId

string

The ID of the resource.

vpc-bp16qjewdsunr41m1****

ResourceName

string

The name of the resource.

Vpc-1

ResourceOwnerId

integer

The ID of the Alibaba Cloud account that holds the resource ownership.

132193271328****

ResourceRegionId

string

The ID of the region where the resource is effective.

cn-hangzhou

Cidr

string

The CIDR block of the resource.

192.168.1.0/24

SourceCidr

string

The source CIDR block.

192.168.1.0/24

Status

string

The status of the resource in the IPAM pool. Valid values:

  • Created: The resource is created.

  • Deleted: The resource is deleted.

Created

ManagementStatus

string

The management status of the resource. Valid values:

  • Managed: The resource has a CIDR block allocated from an IPAM pool. IPAM monitors the resource for potential CIDR overlaps and compliance with pool allocation rules.

  • Unmanaged: The resource does not have a CIDR block allocated from an IPAM pool. IPAM monitors the resource for potential CIDR blocks that comply with pool allocation rules and checks for CIDR overlaps.

  • Ignored: The resource is excluded from monitoring. IPAM does not evaluate ignored resources for overlaps or allocation rule compliance. When you ignore a resource, any space allocated to it from an IPAM pool is returned to the pool, and the resource is not re-imported through automatic import (if automatic import allocation rules are configured for the pool).

Managed

ComplianceStatus

string

The compliance status of the resource. Valid values:

  • Compliant: The CIDR block of the managed resource complies with the allocation rules of the IPAM pool.

  • Noncompliant: The CIDR block of the managed resource does not comply with one or more allocation rules of the IPAM pool.

  • Ignored: The resource is excluded from monitoring. IPAM does not evaluate ignored resources for overlaps or allocation rule compliance.

  • Unmanaged: The resource does not have a CIDR block allocated from an IPAM pool. IPAM does not monitor whether the CIDR block of the resource complies with the allocation rules of the pool, but monitors the CIDR block for overlaps.

Compliant

OverlapStatus

string

The overlap status of the resource. Valid values:

  • Nonoverlapping: The CIDR block of the resource does not overlap with other CIDR blocks within the same scope.

  • Overlapping: The CIDR block of the resource overlaps with another CIDR block within the same scope.

  • Ignored: The resource is excluded from monitoring. IPAM does not evaluate ignored resources for overlaps or allocation rule compliance.

Nonoverlapping

IpUsage

string

The IP address utilization rate, in decimal format.

0

IpCountDetail

object

The details of the IP address count for the resource.

FreeIpCount

string

The number of available IP addresses.

252

TotalIpCount

string

The total number of IP addresses.

256

UsedIpCount

string

The number of allocated IP addresses.

4

IpamId

string

The instance ID of the IPAM.

ipam-uq5dcfc2eqhpf4****

IpamScopeId

string

The instance ID of the IPAM scope.

ipam-scope-glfmcyldpm8lsy****

IpamPoolId

string

The instance ID of the IPAM pool.

ipam-pool-6rcq3tobayc20t***

IpamAllocationId

string

The instance ID used to allocate the IPAM pool CIDR.

ipam-pool-alloc-112za33e4****

VpcId

string

The instance ID of the VPC-connected instance to which the resource belongs.

vpc-bp1fjfnrg3av6zb9e****

OverlapDetail

array<object>

The list of resources that overlap with the current resource.

object

The details of the resource that overlaps with the current resource.

OverlapResourceId

string

The instance ID that overlaps with the current resource.

vpc-aq3fjgnig5av6jb8d****

OverlapResourceRegion

string

The region information of the instance that overlaps with the current resource.

cn-hangzhou

OverlapResourceCidr

string

The CIDR block information of the resource that overlaps with the current resource.

192.168.1.0/24

NextToken

string

The pagination token for the next query. Valid values:

  • If NextToken is empty, no subsequent query is required.

  • If NextToken has a return value, the value is the token for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

TotalCount

integer

The total number of entries that meet the request conditions.

1000

MaxResults

integer

The maximum number of entries to return for a paginated query. Valid values: 1 to 100. Default value: 10.

10

Count

integer

The number of entries returned for the paginated query.

10

RequestId

string

The ID of the request.

49A9DE56-B68C-5FFC-BC06-509D086F287C

Examples

Success response

JSON format

{
  "IpamResourceCidrs": [
    {
      "AliUid": 0,
      "ResourceType": "VPC",
      "ResourceId": "vpc-bp16qjewdsunr41m1****",
      "ResourceName": "Vpc-1",
      "ResourceOwnerId": 0,
      "ResourceRegionId": "cn-hangzhou",
      "Cidr": "192.168.1.0/24",
      "SourceCidr": "192.168.1.0/24",
      "Status": "Created",
      "ManagementStatus": "Managed",
      "ComplianceStatus": "Compliant",
      "OverlapStatus": "Nonoverlapping",
      "IpUsage": "0",
      "IpCountDetail": {
        "FreeIpCount": "252",
        "TotalIpCount": "256",
        "UsedIpCount": "4"
      },
      "IpamId": "ipam-uq5dcfc2eqhpf4****",
      "IpamScopeId": "ipam-scope-glfmcyldpm8lsy****",
      "IpamPoolId": "ipam-pool-6rcq3tobayc20t***",
      "IpamAllocationId": "ipam-pool-alloc-112za33e4****",
      "VpcId": "vpc-bp1fjfnrg3av6zb9e****",
      "OverlapDetail": [
        {
          "OverlapResourceId": "vpc-aq3fjgnig5av6jb8d****",
          "OverlapResourceRegion": "cn-hangzhou",
          "OverlapResourceCidr": "192.168.1.0/24"
        }
      ]
    }
  ],
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "TotalCount": 1000,
  "MaxResults": 10,
  "Count": 10,
  "RequestId": "49A9DE56-B68C-5FFC-BC06-509D086F287C"
}

Error codes

HTTP status code

Error code

Error message

Description

400 Forbidden.QueryShareResource Authentication is failed for querying a shared IPAM pool. Authentication is failed for querying a shared IPAM pool.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.