custom_ranges
Creates, updates, deletes, gets or lists a custom_ranges resource.
Overview
| Name | custom_ranges |
| Type | Resource |
| Id | google.cloudnumberregistry.custom_ranges |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Required. Identifier. The resource name of the CustomRange, in the format projects/{project}/locations/{location}/customRanges/{custom_range}. |
attributes | array | Optional. The attributes of the CustomRange. |
description | string | Optional. The description of the CustomRange. |
ipv4CidrRange | string | Optional. The IPv4 CIDR range of the CustomRange. |
ipv6CidrRange | string | Optional. The IPv6 CIDR range of the CustomRange. |
labels | object | Optional. User-defined labels. |
parentRange | string | Optional. The resource name of the parent CustomRange, in the format projects/{project}/locations/{location}/customRanges/{custom_range}. If specified, the parent CustomRange must be in the same RegistryBook. This field is mutually exclusive with the realm field, as the Realm is inherited from the parent CustomRange. |
realm | string | Optional. The resource name of the Realm associated with the CustomRange, in the format projects/{project}/locations/{location}/realms/{realm}. The Realm must be in the same project as the CustomRange. This field must not be set if the parent_range field is set, as the Realm will be inherited from the parent CustomRange. |
registryBook | string | Output only. The RegistryBook of the CustomRange. This field is inherited from the Realm or parent CustomRange depending on which one is specified. |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, customRangesId | Gets details of a single CustomRange. | |
list | select | projectsId, locationsId | pageSize, pageToken, orderBy, filter | Lists CustomRanges in a given project and location. |
create | insert | projectsId, locationsId | customRangeId, requestId | Creates a new CustomRange in a given project and location. |
patch | update | projectsId, locationsId, customRangesId | updateMask, requestId | Updates the parameters of a single CustomRange. |
delete | delete | projectsId, locationsId, customRangesId | requestId, force | Deletes a single CustomRange. |
find_free_ip_ranges | exec | projectsId, locationsId, customRangesId | cidrPrefixLength, requestId, rangeCount | Finds free IP ranges in a single CustomRange. |
show_utilization | exec | projectsId, locationsId, customRangesId | Gets the details of a single CustomRange and its utilization. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
customRangesId | string | |
locationsId | string | |
projectsId | string | |
cidrPrefixLength | integer (int32) | |
customRangeId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
rangeCount | integer (int32) | |
requestId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets details of a single CustomRange.
SELECT
name,
attributes,
description,
ipv4CidrRange,
ipv6CidrRange,
labels,
parentRange,
realm,
registryBook
FROM google.cloudnumberregistry.custom_ranges
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND customRangesId = '{{ customRangesId }}' -- required
;
Lists CustomRanges in a given project and location.
SELECT
*
FROM google.cloudnumberregistry.custom_ranges
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates a new CustomRange in a given project and location.
INSERT INTO google.cloudnumberregistry.custom_ranges (
data__description,
data__labels,
data__name,
data__ipv4CidrRange,
data__ipv6CidrRange,
data__parentRange,
data__realm,
data__attributes,
projectsId,
locationsId,
customRangeId,
requestId
)
SELECT
'{{ description }}',
'{{ labels }}',
'{{ name }}',
'{{ ipv4CidrRange }}',
'{{ ipv6CidrRange }}',
'{{ parentRange }}',
'{{ realm }}',
'{{ attributes }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ customRangeId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: custom_ranges
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the custom_ranges resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the custom_ranges resource.
- name: description
value: "{{ description }}"
description: |
Optional. The description of the CustomRange.
- name: labels
value: "{{ labels }}"
description: |
Optional. User-defined labels.
- name: name
value: "{{ name }}"
description: |
Required. Identifier. The resource name of the CustomRange, in the format `projects/{project}/locations/{location}/customRanges/{custom_range}`.
- name: ipv4CidrRange
value: "{{ ipv4CidrRange }}"
description: |
Optional. The IPv4 CIDR range of the CustomRange.
- name: ipv6CidrRange
value: "{{ ipv6CidrRange }}"
description: |
Optional. The IPv6 CIDR range of the CustomRange.
- name: parentRange
value: "{{ parentRange }}"
description: |
Optional. The resource name of the parent CustomRange, in the format `projects/{project}/locations/{location}/customRanges/{custom_range}`. If specified, the parent CustomRange must be in the same RegistryBook. This field is mutually exclusive with the `realm` field, as the Realm is inherited from the parent CustomRange.
- name: realm
value: "{{ realm }}"
description: |
Optional. The resource name of the Realm associated with the CustomRange, in the format `projects/{project}/locations/{location}/realms/{realm}`. The Realm must be in the same project as the CustomRange. This field must not be set if the `parent_range` field is set, as the Realm will be inherited from the parent CustomRange.
- name: attributes
description: |
Optional. The attributes of the CustomRange.
value:
- value: "{{ value }}"
key: "{{ key }}"
- name: customRangeId
value: "{{ customRangeId }}"
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- patch
Updates the parameters of a single CustomRange.
UPDATE google.cloudnumberregistry.custom_ranges
SET
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__ipv4CidrRange = '{{ ipv4CidrRange }}',
data__ipv6CidrRange = '{{ ipv6CidrRange }}',
data__parentRange = '{{ parentRange }}',
data__realm = '{{ realm }}',
data__attributes = '{{ attributes }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customRangesId = '{{ customRangesId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single CustomRange.
DELETE FROM google.cloudnumberregistry.custom_ranges
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customRangesId = '{{ customRangesId }}' --required
AND requestId = '{{ requestId }}'
AND force = '{{ force }}'
;
Lifecycle Methods
- find_free_ip_ranges
- show_utilization
Finds free IP ranges in a single CustomRange.
EXEC google.cloudnumberregistry.custom_ranges.find_free_ip_ranges
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@customRangesId='{{ customRangesId }}' --required,
@cidrPrefixLength='{{ cidrPrefixLength }}',
@requestId='{{ requestId }}',
@rangeCount='{{ rangeCount }}'
;
Gets the details of a single CustomRange and its utilization.
EXEC google.cloudnumberregistry.custom_ranges.show_utilization
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@customRangesId='{{ customRangesId }}' --required
;