Cloud Number Registry API . projects . locations . discoveredRanges

Instance Methods

close()

Close httplib2 connections.

findFreeIpRanges(name, cidrPrefixLength=None, rangeCount=None, requestId=None, x__xgafv=None)

Finds free IP ranges in a single DiscoveredRange.

get(name, x__xgafv=None)

Gets details of a single DiscoveredRange.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

Lists DiscoveredRanges in a given project and location.

list_next()

Retrieves the next page of results.

showUtilization(name, x__xgafv=None)

Gets the details of a single DiscoveredRange and its utilization.

Method Details

close()
Close httplib2 connections.
findFreeIpRanges(name, cidrPrefixLength=None, rangeCount=None, requestId=None, x__xgafv=None)
Finds free IP ranges in a single DiscoveredRange.

Args:
  name: string, Required. The resource name of the DiscoveredRange to search within. (required)
  cidrPrefixLength: integer, Required. The prefix length of the free IP ranges to find.
  rangeCount: integer, Optional. The number of free IP ranges to find.
  requestId: string, Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for the CloudNumberRegistry.FindDiscoveredRangeFreeIpRanges method.
  "freeIpCidrRanges": [ # Output only. The free IP CIDR ranges found.
    "A String",
  ],
}
get(name, x__xgafv=None)
Gets details of a single DiscoveredRange.

Args:
  name: string, Required. The resource name of the DiscoveredRange to retrieve. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A DiscoveredRange represents an IP address range automatically detected by the discovery pipeline.
  "attributes": [ # Optional. The attributes of the DiscoveredRange.
    { # A key-value pair representing a custom attribute associated with a resource.
      "key": "A String", # Required. The key of the attribute.
      "value": "A String", # Required. The value of the attribute.
    },
  ],
  "childCidrOverlapAllowed": True or False, # Output only. If true, allows child DiscoveredRanges of this DiscoveredRange to overlap with each other.
  "createTime": "A String", # Output only. The time at which the DiscoveredRange was created.
  "description": "A String", # Optional. Description of the DiscoveredRange.
  "discoveryMetadata": { # Metadata about a discovered resource, tracking event times, state, and source information. # Output only. Owner metadata for this DiscoveredRange. A unique set of metadata is associated with each DiscoveredRange. If an IP range is shared by multiple resources (e.g., an Address resource and an Instance resource, or multiple ForwardingRules),separate DiscoveredRanges are created, each with a distinct owner. This ensures each DiscoveredRange has its own unique set of attributes, labels, create time and update time.
    "createTime": "A String", # Output only. The time when the resource was created.
    "eventTime": "A String", # Output only. The time when the event happened.
    "resource": "A String", # Output only. The resource name of the discovered resource, should be API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
    "resourceUri": "A String", # Output only. The resource uri of the discovered resource.
    "sourceId": "A String", # Output only. The canonical google.aip.dev/122 name of the source resource.
    "sourceSubId": "A String", # Output only. A single source resource can be the source of multiple CNR resources. This sub_id is used to distinguish between the different CNR resources derived from the same upstream resource. For example, a single subnetwork can be the source of multiple Ranges, one for each protocol. In this case, the sub_id could be "private-ipv4" or "private-ipv6".
    "state": "A String", # Output only. The state of the resource.
    "updateTime": "A String", # Output only. The time when the resource was last modified.
  },
  "ipv4CidrRange": "A String", # Optional. The IPv4 CIDR range of the DiscoveredRange.
  "ipv6CidrRange": "A String", # Optional. The IPv6 CIDR range of the DiscoveredRange.
  "labels": { # Optional. User-defined labels.
    "a_key": "A String",
  },
  "name": "A String", # Required. Identifier. The resource name of the DiscoveredRange, in the format `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
  "parentRange": "A String", # Optional. The resource name of the parent DiscoveredRange, in the format `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
  "realm": "A String", # Optional. The Realm of the DiscoveredRange.
  "registryBook": "A String", # Output only. The RegistryBook of the DiscoveredRange.
  "updateTime": "A String", # Output only. The time at which the DiscoveredRange was last updated.
}
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists DiscoveredRanges in a given project and location.

Args:
  parent: string, Required. The parent resource name, for example `projects/*/locations/*`. (required)
  filter: string, Optional. Filter expression to filter the results.
  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.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for the CloudNumberRegistry.ListDiscoveredRanges method.
  "discoveredRanges": [ # The list of DiscoveredRanges.
    { # A DiscoveredRange represents an IP address range automatically detected by the discovery pipeline.
      "attributes": [ # Optional. The attributes of the DiscoveredRange.
        { # A key-value pair representing a custom attribute associated with a resource.
          "key": "A String", # Required. The key of the attribute.
          "value": "A String", # Required. The value of the attribute.
        },
      ],
      "childCidrOverlapAllowed": True or False, # Output only. If true, allows child DiscoveredRanges of this DiscoveredRange to overlap with each other.
      "createTime": "A String", # Output only. The time at which the DiscoveredRange was created.
      "description": "A String", # Optional. Description of the DiscoveredRange.
      "discoveryMetadata": { # Metadata about a discovered resource, tracking event times, state, and source information. # Output only. Owner metadata for this DiscoveredRange. A unique set of metadata is associated with each DiscoveredRange. If an IP range is shared by multiple resources (e.g., an Address resource and an Instance resource, or multiple ForwardingRules),separate DiscoveredRanges are created, each with a distinct owner. This ensures each DiscoveredRange has its own unique set of attributes, labels, create time and update time.
        "createTime": "A String", # Output only. The time when the resource was created.
        "eventTime": "A String", # Output only. The time when the event happened.
        "resource": "A String", # Output only. The resource name of the discovered resource, should be API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
        "resourceUri": "A String", # Output only. The resource uri of the discovered resource.
        "sourceId": "A String", # Output only. The canonical google.aip.dev/122 name of the source resource.
        "sourceSubId": "A String", # Output only. A single source resource can be the source of multiple CNR resources. This sub_id is used to distinguish between the different CNR resources derived from the same upstream resource. For example, a single subnetwork can be the source of multiple Ranges, one for each protocol. In this case, the sub_id could be "private-ipv4" or "private-ipv6".
        "state": "A String", # Output only. The state of the resource.
        "updateTime": "A String", # Output only. The time when the resource was last modified.
      },
      "ipv4CidrRange": "A String", # Optional. The IPv4 CIDR range of the DiscoveredRange.
      "ipv6CidrRange": "A String", # Optional. The IPv6 CIDR range of the DiscoveredRange.
      "labels": { # Optional. User-defined labels.
        "a_key": "A String",
      },
      "name": "A String", # Required. Identifier. The resource name of the DiscoveredRange, in the format `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
      "parentRange": "A String", # Optional. The resource name of the parent DiscoveredRange, in the format `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
      "realm": "A String", # Optional. The Realm of the DiscoveredRange.
      "registryBook": "A String", # Output only. The RegistryBook of the DiscoveredRange.
      "updateTime": "A String", # Output only. The time at which the DiscoveredRange was last updated.
    },
  ],
  "nextPageToken": "A String", # A token to retrieve the next page of results, or empty if there are no more results in the list.
  "unreachable": [ # Locations that could not be reached.
    "A String",
  ],
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
showUtilization(name, x__xgafv=None)
Gets the details of a single DiscoveredRange and its utilization.

Args:
  name: string, Required. The resource name of the DiscoveredRange. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for the CloudNumberRegistry.ShowDiscoveredRangeUtilization method.
  "discoveredRange": { # A DiscoveredRange represents an IP address range automatically detected by the discovery pipeline. # The DiscoveredRange resource.
    "attributes": [ # Optional. The attributes of the DiscoveredRange.
      { # A key-value pair representing a custom attribute associated with a resource.
        "key": "A String", # Required. The key of the attribute.
        "value": "A String", # Required. The value of the attribute.
      },
    ],
    "childCidrOverlapAllowed": True or False, # Output only. If true, allows child DiscoveredRanges of this DiscoveredRange to overlap with each other.
    "createTime": "A String", # Output only. The time at which the DiscoveredRange was created.
    "description": "A String", # Optional. Description of the DiscoveredRange.
    "discoveryMetadata": { # Metadata about a discovered resource, tracking event times, state, and source information. # Output only. Owner metadata for this DiscoveredRange. A unique set of metadata is associated with each DiscoveredRange. If an IP range is shared by multiple resources (e.g., an Address resource and an Instance resource, or multiple ForwardingRules),separate DiscoveredRanges are created, each with a distinct owner. This ensures each DiscoveredRange has its own unique set of attributes, labels, create time and update time.
      "createTime": "A String", # Output only. The time when the resource was created.
      "eventTime": "A String", # Output only. The time when the event happened.
      "resource": "A String", # Output only. The resource name of the discovered resource, should be API-agnostic. Example: "projects/{project_number}/networks/{network_id}".
      "resourceUri": "A String", # Output only. The resource uri of the discovered resource.
      "sourceId": "A String", # Output only. The canonical google.aip.dev/122 name of the source resource.
      "sourceSubId": "A String", # Output only. A single source resource can be the source of multiple CNR resources. This sub_id is used to distinguish between the different CNR resources derived from the same upstream resource. For example, a single subnetwork can be the source of multiple Ranges, one for each protocol. In this case, the sub_id could be "private-ipv4" or "private-ipv6".
      "state": "A String", # Output only. The state of the resource.
      "updateTime": "A String", # Output only. The time when the resource was last modified.
    },
    "ipv4CidrRange": "A String", # Optional. The IPv4 CIDR range of the DiscoveredRange.
    "ipv6CidrRange": "A String", # Optional. The IPv6 CIDR range of the DiscoveredRange.
    "labels": { # Optional. User-defined labels.
      "a_key": "A String",
    },
    "name": "A String", # Required. Identifier. The resource name of the DiscoveredRange, in the format `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
    "parentRange": "A String", # Optional. The resource name of the parent DiscoveredRange, in the format `projects/{project}/locations/{location}/discoveredRanges/{discovered_range}`.
    "realm": "A String", # Optional. The Realm of the DiscoveredRange.
    "registryBook": "A String", # Output only. The RegistryBook of the DiscoveredRange.
    "updateTime": "A String", # Output only. The time at which the DiscoveredRange was last updated.
  },
  "rangeUtilization": { # Utilization metrics for an IP Range, including consumed and produced address counts. # The utilization details of the DiscoveredRange.
    "totalConsumed": "A String", # Output only. The total number of IP addresses consumed in the Range.
    "totalProduced": "A String", # Output only. The total number of IP addresses produced in the Range.
    "usage": 3.14, # Output only. The usage of the Range as a percentage. This is marked as optional so that we have presence tracking and API responses show 0.0 instead of NULL.
  },
}