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 resource 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. - managementType: The management type of the Realm (e.g., "CNR", "USER").

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 - managementType=CNR

orderBy

string

Optional. Hint for how to order the results. Supported sort fields are: - name: Sort alphabetically by the resource name. - createTime: Sort by the creation timestamp of the resource. - updateTime: Sort by the last update timestamp of the resource.

Supported directions are asc (ascending) and desc (descending). If unspecified, direction defaults to asc. Only sorting by a single field is supported.

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

Response message for the CloudNumberRegistry.SearchIpResources method.

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

Represents 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 CustomRange.

discoveredRange

object (DiscoveredRange)

A DiscoveredRange.

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.