mmv1/products/bigtable/MaterializedView.yaml (69 lines of code) (raw):
# Copyright 2025 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
name: 'MaterializedView'
kind: 'bigtable#materializedView'
description: |
A materialized view object that can be referenced in SQL queries.
references:
guides:
api: 'https://cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.materializedViews'
docs:
id_format: 'projects/{{project}}/instances/{{instance}}/materializedViews/{{materialized_view_id}}'
base_url: 'projects/{{project}}/instances/{{instance}}/materializedViews?materializedViewId={{materialized_view_id}}'
self_link: 'projects/{{project}}/instances/{{instance}}/materializedViews/{{materialized_view_id}}'
create_url: 'projects/{{project}}/instances/{{instance}}/materializedViews?materializedViewId={{materialized_view_id}}'
update_url: 'projects/{{project}}/instances/{{instance}}/materializedViews/{{materialized_view_id}}'
update_verb: 'PATCH'
update_mask: true
delete_url: 'projects/{{project}}/instances/{{instance}}/materializedViews/{{materialized_view_id}}'
import_format:
- 'projects/{{project}}/instances/{{instance}}/materializedViews/{{materialized_view_id}}'
timeouts:
insert_minutes: 120
update_minutes: 20
delete_minutes: 20
exclude_sweeper: true
examples:
- name: 'bigtable_materialized_view'
primary_resource_id: 'materialized_view'
vars:
instance_name: 'bt-instance'
table_name: 'bt-table'
materialized_view_name: 'bt-materialized-view'
deletion_protection: 'true'
test_vars_overrides:
'deletion_protection': 'false'
oics_vars_overrides:
'deletion_protection': 'false'
# bigtable instance does not use the shared HTTP client, this test creates an instance
skip_vcr: true
parameters:
- name: 'materializedViewId'
type: String
description:
'The unique name of the materialized view in the form
`[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.'
url_param_only: true
required: true
immutable: true
- name: 'instance'
type: String
description: 'The name of the instance to create the materialized view within.'
url_param_only: true
immutable: true
diff_suppress_func: 'tpgresource.CompareResourceNames'
properties:
- name: 'name'
type: String
description:
'The unique name of the requested materialized view. Values are of the form
`projects/<project>/instances/<instance>/materializedViews/<materializedViewId>`.'
output: true
- name: 'query'
type: String
description:
'The materialized view''s select query.'
required: true
immutable: true
- name: 'deletionProtection'
type: Boolean
description:
'Set to true to make the MaterializedView protected against deletion.'