Lists the IP addresses used by discovered resources in a VPC or vSwitch.
Operation description
Supported query combinations:
VpcIdonlyVSwitchIdonlyVpcId+VSwitchIdVpcId+CidrBlockVSwitchId+CidrBlockVpcId+VSwitchId+CidrBlock
Try it now
Test
RAM authorization
Request parameters
Parameter | Type | Required | Description | Example |
RegionId | string | Yes | The ID of the region where the resource discovery instance is hosted. | cn-hangzhou |
IpamResourceDiscoveryId | string | Yes | The ID of the resource discovery instance. | ipam-res-disco-jt5f2af2u6nk2z321**** |
VpcId | string | No | The ID of a discovered VPC. Note You must specify at least one of VpcId and VSwitchId. | vpc-bp1fjfnrg3av6zb9e**** |
VSwitchId | string | No | The ID of a discovered VSwitch. Note You must specify at least one of VpcId and VSwitchId. | vsw-bp1bmwg5u07e1l3q0is4w |
Cidr | string | No | The CIDR block to search for used IP addresses in a VPC or vSwitch. To query a specific IP address, use a /32 prefix length. Note Only IPv4 CIDR blocks are supported. | 192.168.1.0/24 |
IpVersion | string | No | The IP protocol version. Valid value:
Valid values:
| IPv4 |
NextToken | string | No | The token used to retrieve the next page of results. Valid values:
| FFmyTO70tTpLG6I3FmYAXGKPd**** |
MaxResults | integer | No | The maximum number of entries to return per page. Valid values: 1 to 200. Default value: 100. | 100 |
Response elements
Element | Type | Description | Example |
object | The response object. | ||
| IpamDiscoveredIpAddresses | array<object> | Details of the used IP addresses. | |
object | |||
VpcId | string | The VPC ID. | vpc-bp1fjfnrg3av6zb9e**** |
VSwitchId | string | The vSwitch ID. | vsw-bp1bmwg5u07e1l3q0is4w |
IpVersion | string | The IP version. Valid value:
| IPv4 |
IpAddress | string | The IP address in use. | 192.168.10.40/32 |
ResourceId | string | The resource ID. | eni-bp1001jpjhzmgc5m**** |
ResourceRegionId | string | The ID of the region in which the resource resides. | cn-shenzhen |
ResourceServiceType | string | The cloud service to which the resource belongs. | ENI |
NextToken | string | The pagination token. Use this token in a subsequent request to retrieve the next page of results. Valid values:
| FFmyTO70tTpLG6I3FmYAXGKPd**** |
TotalCount | integer | The total number of entries that match the query. | 1000 |
MaxResults | integer | The maximum number of entries to return per page. Valid values: 1 to 200. Default value: 100. | 100 |
Count | integer | The number of entries returned on the current page. | 10 |
RequestId | string | The request ID. | 9F8315CB-560E-5F1E-B069-6E44B440CAF8 |
Examples
Success response
JSON format
{
"IpamDiscoveredIpAddresses": [
{
"VpcId": "vpc-bp1fjfnrg3av6zb9e****",
"VSwitchId": "vsw-bp1bmwg5u07e1l3q0is4w",
"IpVersion": "IPv4",
"IpAddress": "192.168.10.40/32",
"ResourceId": "eni-bp1001jpjhzmgc5m****",
"ResourceRegionId": "cn-shenzhen",
"ResourceServiceType": "ENI"
}
],
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"TotalCount": 1000,
"MaxResults": 100,
"Count": 10,
"RequestId": "9F8315CB-560E-5F1E-B069-6E44B440CAF8"
}Error codes
HTTP status code | Error code | Error message | Description |
400 | ResourceNotFound.IpamResourceDiscovery | The dependent instance of IPAM resource discovery is not found. | The dependent instance of IPAM resource discovery is not found. |
400 | MissingParam.IpamResourceDiscoveryId | The IpamResourceDiscoveryId must be input. | The IpamResourceDiscoveryId must be input. |
400 | Forbidden.IpResourceAccess | The IPAM resource discovery instance in the parameters is not allowed to access the IP address of resource %s. | The IPAM resource discovery instance in the parameters is not allowed to access the IP address of resource %s. |
400 | IllegalParamFormat.%s | The param of %s is illegal. | The param of %s is illegal. |
400 | ResourceNotFound.IpamDiscoveredResource | The queried %s is not found among IPAM discovered resources. | The queried %s is not found among IPAM discovered resources. |
400 | Mismatch.VpcIdAndVSwitchId | VpcId and VSwitchId do not match. | VpcId and VSwitchId do not match. |
400 | MissingParam.VpcIdAndVSwitchId | VpcId and VSwitchId cannot both be empty please provide at least one. | VpcId and VSwitchId cannot both be empty please provide at least one. |
400 | Mismatch.IpamResourceDiscoveryAndResource | The IPAM resource discovery %s and the queried %s do not match. | The IPAM resource discovery %s and the queried %s do not match. |
400 | ResourceNotFound.IpamDiscoveredResource.Vpc | The queried VPC %s is not found among IPAM discovered resources. | The queried VPC %s is not found among IPAM discovered resources. |
400 | ResourceNotFound.IpamDiscoveredResource.VSwitch | The queried VSwitch %s is not found among IPAM discovered resources. | The queried VSwitch %s is not found among IPAM discovered resources. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.