authorized_views
Creates, updates, deletes, gets or lists a authorized_views
resource.
Overview
Name | authorized_views |
Type | Resource |
Id | google.bigtableadmin.authorized_views |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The name of this AuthorizedView. Values are of the form projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view} |
deletionProtection | boolean | Set 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. |
etag | string | The 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. |
subsetView | object | Defines a simple AuthorizedView that is a subset of the underlying Table. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | authorizedViewsId, instancesId, projectsId, tablesId | Gets information from a specified AuthorizedView. |
list | SELECT | instancesId, projectsId, tablesId | Lists all AuthorizedViews from a specific table. |
create | INSERT | instancesId, projectsId, tablesId | Creates a new AuthorizedView in a table. |
delete | DELETE | authorizedViewsId, instancesId, projectsId, tablesId | Permanently deletes a specified AuthorizedView. |
patch | UPDATE | authorizedViewsId, instancesId, projectsId, tablesId | Updates 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.bigtableadmin.authorized_views (
instancesId,
projectsId,
tablesId,
name,
subsetView,
etag,
deletionProtection
)
SELECT
'{{ instancesId }}',
'{{ projectsId }}',
'{{ tablesId }}',
'{{ name }}',
'{{ subsetView }}',
'{{ etag }}',
{{ deletionProtection }}
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: subsetView
value:
- name: rowPrefixes
value:
- string
- name: familySubsets
value: object
- name: etag
value: string
- name: deletionProtection
value: boolean
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 }}';