Method: projects.locations.registryBooks.searchIpResources

Searches IP resources in a given RegistryBook.

HTTP request

POST https://cloudnumberregistry.googleapis.com/v1alpha/{name=projects/*/locations/*/registryBooks/*}:searchIpResources

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the RegistryBook to search in.

Request body

The request body contains data with the following structure:

JSON representation
{
  "query": string,
  "orderBy": string,
  "pageSize": integer,
  "pageToken": string,
  "showUtilization": boolean,
  "searchResourceTypes": [
    enum (SearchResourceType)
  ]
}
Fields
query

string

Optional. Search query. This string filters resources in an AIP-160-like format. It has some limitations. You can only specify top level conjunctions or attribute level negations. Each restriction can only be used once except the attribute restriction.

The available restrictions for ranges are: - realm: The realm name to search in. - ip_address: The IP address to search for within ranges. - ipVersion: The IP version to filter by (e.g., "IPV4", "IPV6"). - parentRange: The parent range of the range to search for. - attribute_text: The attribute text to search for within ranges. - attribute: The attribute key and value to filter by.

The available restrictions for realms are: - ipVersion: The IP version to search for.

Only one of attribute_text or multiple attribute filters can be specified. Examples: - realm=test-realm - realm=test-realm AND ip_address=10.0.0.0 - realm=test-realm AND ipVersion=IPV6 - realm=test-realm AND attribute_text=test - ip_address=10.0.0.0 AND attribute:(key1=value1) AND attribute:(key2=value2) - attribute_text=test AND parentRange=projects/123/locations/global/discoveredRanges/test-parent-range

orderBy

string

Optional. Hint for how to order the results

pageSize

integer

Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

pageToken

string

Optional. A token identifying a page of results the server should return.

showUtilization

boolean

Optional. Whether to show the utilization of the ranges in the response.

searchResourceTypes[]

enum (SearchResourceType)

Optional. The type of resources to search for. If not specified, the server will return ranges.

Response body

Message for response to searching IP resources

If successful, the response body contains data with the following structure:

JSON representation
{
  "ranges": [
    {
      object (Range)
    }
  ],
  "results": [
    {
      object (SearchIpResourcesResult)
    }
  ],
  "nextPageToken": string,
  "unreachable": [
    string
  ]
}
Fields
ranges[]
(deprecated)

object (Range)

Deprecated: Use results field instead. The list of ranges matching the search query.

results[]

object (SearchIpResourcesResult)

The list of results matching the search query.

nextPageToken

string

A token identifying a page of results the server should return.

unreachable[]

string

Locations that could not be reached.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • cloudnumberregistry.registryBooks.get

For more information, see the IAM documentation.

SearchResourceType

The type of resources to search for.

Enums
SEARCH_RESOURCE_TYPE_UNSPECIFIED Unspecified search type.
RANGES Search for ranges.
REALMS Search for realms.

Range

Message describing either a CustomRange or a DiscoveredRange.

JSON representation
{
  "utilization": {
    object (RangeUtilization)
  },

  // Union field range can be only one of the following:
  "customRange": {
    object (CustomRange)
  },
  "discoveredRange": {
    object (DiscoveredRange)
  }
  // End of list of possible types for union field range.
}
Fields
utilization

object (RangeUtilization)

The utilization of the range.

Union field range. The range. range can be only one of the following:
customRange

object (CustomRange)

A custom range.

discoveredRange

object (DiscoveredRange)

A discovered range.

SearchIpResourcesResult

A result matching the search query, which can be either a range or a realm.

JSON representation
{

  // Union field result can be only one of the following:
  "range": {
    object (Range)
  },
  "realm": {
    object (Realm)
  }
  // End of list of possible types for union field result.
}
Fields
Union field result. Either a range or a realm matching the search query. result can be only one of the following:
range

object (Range)

A range matching the search query.

realm

object (Realm)

A realm matching the search query.