Skip to main content

custom_ranges

Creates, updates, deletes, gets or lists a custom_ranges resource.

Overview​

Namecustom_ranges
TypeResource
Idgoogle.cloudnumberregistry.custom_ranges

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringRequired. Identifier. The resource name of the CustomRange, in the format projects/{project}/locations/{location}/customRanges/{custom_range}.
attributesarrayOptional. The attributes of the CustomRange.
descriptionstringOptional. The description of the CustomRange.
ipv4CidrRangestringOptional. The IPv4 CIDR range of the CustomRange.
ipv6CidrRangestringOptional. The IPv6 CIDR range of the CustomRange.
labelsobjectOptional. User-defined labels.
parentRangestringOptional. 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.
realmstringOptional. 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.
registryBookstringOutput only. The RegistryBook of the CustomRange. This field is inherited from the Realm or parent CustomRange depending on which one is specified.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, customRangesIdGets details of a single CustomRange.
listselectprojectsId, locationsIdfilter, orderBy, pageSize, pageTokenLists CustomRanges in a given project and location.
createinsertprojectsId, locationsIdcustomRangeId, requestIdCreates a new CustomRange in a given project and location.
patchupdateprojectsId, locationsId, customRangesIdrequestId, updateMaskUpdates the parameters of a single CustomRange.
deletedeleteprojectsId, locationsId, customRangesIdforce, requestIdDeletes a single CustomRange.
find_free_ip_rangesexecprojectsId, locationsId, customRangesIdcidrPrefixLength, rangeCount, requestIdFinds free IP ranges in a single CustomRange.
show_utilizationexecprojectsId, locationsId, customRangesIdGets 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.

NameDatatypeDescription
customRangesIdstring
locationsIdstring
projectsIdstring
cidrPrefixLengthinteger (int32)
customRangeIdstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
rangeCountinteger (int32)
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples​

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
;

INSERT examples​

Creates a new CustomRange in a given project and location.

INSERT INTO google.cloudnumberregistry.custom_ranges (
data__attributes,
data__description,
data__ipv4CidrRange,
data__ipv6CidrRange,
data__labels,
data__name,
data__parentRange,
data__realm,
projectsId,
locationsId,
customRangeId,
requestId
)
SELECT
'{{ attributes }}',
'{{ description }}',
'{{ ipv4CidrRange }}',
'{{ ipv6CidrRange }}',
'{{ labels }}',
'{{ name }}',
'{{ parentRange }}',
'{{ realm }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ customRangeId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Updates the parameters of a single CustomRange.

UPDATE google.cloudnumberregistry.custom_ranges
SET
data__attributes = '{{ attributes }}',
data__description = '{{ description }}',
data__ipv4CidrRange = '{{ ipv4CidrRange }}',
data__ipv6CidrRange = '{{ ipv6CidrRange }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__parentRange = '{{ parentRange }}',
data__realm = '{{ realm }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customRangesId = '{{ customRangesId }}' --required
AND requestId = '{{ requestId}}'
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples​

Deletes a single CustomRange.

DELETE FROM google.cloudnumberregistry.custom_ranges
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customRangesId = '{{ customRangesId }}' --required
AND force = '{{ force }}'
AND requestId = '{{ requestId }}'
;

Lifecycle Methods​

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 }}',
@rangeCount='{{ rangeCount }}',
@requestId='{{ requestId }}'
;