Skip to main content

authorized_views

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

Overview

Nameauthorized_views
TypeResource
Idgoogle.bigtableadmin.authorized_views

Fields

NameDatatypeDescription
namestringIdentifier. The name of this AuthorizedView. Values are of the form projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}
deletionProtectionbooleanSet to true to make the AuthorizedView protected against deletion. The parent Table and containing Instance cannot be deleted if an AuthorizedView has this bit set.
etagstringThe etag for this AuthorizedView. If this is provided on update, it must match the server's etag. The server returns ABORTED error on a mismatched etag.
subsetViewobjectDefines a simple AuthorizedView that is a subset of the underlying Table.

Methods

NameAccessible byRequired ParamsDescription
getSELECTauthorizedViewsId, instancesId, projectsId, tablesIdGets information from a specified AuthorizedView.
listSELECTinstancesId, projectsId, tablesIdLists all AuthorizedViews from a specific table.
createINSERTinstancesId, projectsId, tablesIdCreates a new AuthorizedView in a table.
deleteDELETEauthorizedViewsId, instancesId, projectsId, tablesIdPermanently deletes a specified AuthorizedView.
patchUPDATEauthorizedViewsId, instancesId, projectsId, tablesIdUpdates an AuthorizedView in a table.

SELECT examples

Lists all AuthorizedViews from a specific table.

SELECT
name,
deletionProtection,
etag,
subsetView
FROM google.bigtableadmin.authorized_views
WHERE instancesId = '{{ instancesId }}'
AND projectsId = '{{ projectsId }}'
AND tablesId = '{{ tablesId }}';

INSERT example

Use the following StackQL query and manifest file to create a new authorized_views resource.

/*+ create */
INSERT INTO google.bigtableadmin.authorized_views (
instancesId,
projectsId,
tablesId,
name,
subsetView,
etag,
deletionProtection
)
SELECT
'{{ instancesId }}',
'{{ projectsId }}',
'{{ tablesId }}',
'{{ name }}',
'{{ subsetView }}',
'{{ etag }}',
{{ deletionProtection }}
;

UPDATE example

Updates a authorized_views resource.

/*+ update */
UPDATE google.bigtableadmin.authorized_views
SET
name = '{{ name }}',
subsetView = '{{ subsetView }}',
etag = '{{ etag }}',
deletionProtection = true|false
WHERE
authorizedViewsId = '{{ authorizedViewsId }}'
AND instancesId = '{{ instancesId }}'
AND projectsId = '{{ projectsId }}'
AND tablesId = '{{ tablesId }}';

DELETE example

Deletes the specified authorized_views resource.

/*+ delete */
DELETE FROM google.bigtableadmin.authorized_views
WHERE authorizedViewsId = '{{ authorizedViewsId }}'
AND instancesId = '{{ instancesId }}'
AND projectsId = '{{ projectsId }}'
AND tablesId = '{{ tablesId }}';