Skip to main content

registry_books

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

Overview

Nameregistry_books
TypeResource
Idgoogle.cloudnumberregistry.registry_books

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringRequired. Identifier. The resource name of the RegistryBook.
aggregatedDataobjectOutput only. Aggregated data for the RegistryBook. Populated only when the view is AGGREGATE. (id: AggregatedData)
claimedScopesarrayOptional. List of scopes claimed by the RegistryBook. In Preview, Only project scope is supported. Each scope is in the format of projects/{project}. Each scope can only be claimed once.
createTimestring (google-datetime)Output only. The time at which the RegistryBook was created.
isDefaultbooleanOutput only. Whether the RegistryBook is the default one.
labelsobjectOptional. User-defined labels.
updateTimestring (google-datetime)Output only. The time at which the RegistryBook was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, registryBooksIdviewGets details of a single RegistryBook.
listselectprojectsId, locationsIdorderBy, pageToken, pageSize, view, filterLists RegistryBooks in a given project and location.
createinsertprojectsId, locationsIdregistryBookId, requestIdCreates a new RegistryBook in a given project and location.
patchupdateprojectsId, locationsId, registryBooksIdupdateMask, requestIdUpdates the parameters of a single RegistryBook.
deletedeleteprojectsId, locationsId, registryBooksIdforce, requestIdDeletes a single RegistryBook.
search_ip_resourcesexecprojectsId, locationsId, registryBooksIdSearches IP resources in a given RegistryBook.

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
locationsIdstring
projectsIdstring
registryBooksIdstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
registryBookIdstring
requestIdstring
updateMaskstring (google-fieldmask)
viewstring

SELECT examples

Gets details of a single RegistryBook.

SELECT
name,
aggregatedData,
claimedScopes,
createTime,
isDefault,
labels,
updateTime
FROM google.cloudnumberregistry.registry_books
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND registryBooksId = '{{ registryBooksId }}' -- required
AND view = '{{ view }}'
;

INSERT examples

Creates a new RegistryBook in a given project and location.

INSERT INTO google.cloudnumberregistry.registry_books (
data__labels,
data__name,
data__claimedScopes,
projectsId,
locationsId,
registryBookId,
requestId
)
SELECT
'{{ labels }}',
'{{ name }}',
'{{ claimedScopes }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ registryBookId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single RegistryBook.

UPDATE google.cloudnumberregistry.registry_books
SET
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__claimedScopes = '{{ claimedScopes }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND registryBooksId = '{{ registryBooksId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single RegistryBook.

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

Lifecycle Methods

Searches IP resources in a given RegistryBook.

EXEC google.cloudnumberregistry.registry_books.search_ip_resources
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@registryBooksId='{{ registryBooksId }}' --required
@@json=
'{
"searchResourceTypes": "{{ searchResourceTypes }}",
"showUtilization": {{ showUtilization }},
"pageSize": {{ pageSize }},
"query": "{{ query }}",
"orderBy": "{{ orderBy }}",
"pageToken": "{{ pageToken }}"
}'
;