feat: Add new gcloud commands, API clients, and third-party libraries across various services.

This commit is contained in:
2026-01-01 20:26:35 +01:00
parent 5e23cbece0
commit a19e592eb7
25221 changed files with 8324611 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
"""The Authorized Views command group for Cloud Bigtable."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
class AuthorizedViews(base.Group):
"""Manage Cloud Bigtable Authorized Views."""

View File

@@ -0,0 +1,35 @@
- release_tracks: [GA, BETA, ALPHA]
help_text:
brief: Add an IAM policy binding to a Cloud Bigtable authorized view.
description: |
Add an IAM policy binding to a Cloud Bigtable authorized view. One binding consists of a member,
a role, and an optional condition.
examples: |
To add an IAM policy binding for the role of `roles/editor` for the user `test-user@gmail.com`
with authorized view `my-authorized-view` in instance `my-instance` and table `my-table`, run:
$ {command} my-authorized-view --instance=`my-instance` --table=`my-table` --member=`user:test-user@gmail.com` --role=`roles/editor`
To add an IAM policy binding which expires at the end of the year 2020 for the role of
`roles/bigtable.admin` and the user `test-user@gmail.com` with authorized view `my-authorized-view`
in instance `my-instance` and table `my-table`, run:
$ {command} my-authorized-view --instance=`my-instance` --table=`my-table` --member=`user:test-user@gmail.com` --role=`roles/bigtable.admin` --condition=`expression=request.time < timestamp("2021-01-01T00:00:00Z"),title=expires_end_of_2020,description=Expires at midnight on 2020-12-31`
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
iam:
enable_condition: true
policy_version: 3
get_iam_policy_version_path: getIamPolicyRequest.options.requestedPolicyVersion
request:
collection: bigtableadmin.projects.instances.tables.authorizedViews
arguments:
resource:
help_text: Cloud Bigtable authorized view to add the IAM policy binding to.
spec: !REF googlecloudsdk.command_lib.bigtable.resources:authorized_view

View File

@@ -0,0 +1,61 @@
- release_tracks: [GA, BETA, ALPHA]
help_text:
brief: Create a new Cloud Bigtable authorized view.
description: Create a new Cloud Bigtable authorized view.
examples: |
To create an authorized view `my-authorized-view` in instance `my-instance` and table
`my-table`, using the definition file `authorized_view.json`:
$ {command} my-authorized-view --instance=test-instance --table=test-table --definition-file=authorized_view.json
To create an authorized view `my-authorized-view` in instance `my-instance` and table
`my-table`, using the pre-encoded definition file `authorized_view_pre_encoded.json`:
$ {command} my-authorized-view --instance=test-instance --table=test-table --definition-file=authorized_view_pre_encoded.json --pre-encoded
request:
collection: bigtableadmin.projects.instances.tables.authorizedViews
method: create
modify_request_hooks:
- googlecloudsdk.api_lib.bigtable.authorized_views:ModifyCreateAuthorizedViewRequest
arguments:
resource:
help_text: Cloud Bigtable authorized view to create.
spec: !REF googlecloudsdk.command_lib.bigtable.resources:authorized_view
params:
- arg_name: definition-file
help_text: |
Path to a JSON or YAML file containing a valid authorized view protobuf.
The `name` field is ignored. The name is deduced from the other command line arguments.
Example:
{
"subsetView":
{
"rowPrefixes": ["store1#"],
"familySubsets":
{
"column_family_name":
{
"qualifiers":["address"],
"qualifierPrefixes":["tel"]
}
}
},
"deletionProtection": true
}
- arg_name: pre-encoded
type: bool
default: false
help_text: |
By default, Base64 encoding is applied to all binary fields ("rowPrefixes", "qualifiers" and
"qualifierPrefixes") in the JSON or YAML definition file.
Use this to indicate that all binary fields are already Base64-encoded and should be used
directly.
async:
collection: bigtableadmin.operations

View File

@@ -0,0 +1,19 @@
- release_tracks: [GA, BETA, ALPHA]
help_text:
brief: Delete a Cloud Bigtable authorized view.
description: Delete new Cloud Bigtable authorized view.
examples: |
To delete the authorized view `my-authorized-view` in instance `my-instance` and table
`my-table`:
$ {command} my-authorized-view --instance=test-instance --table=test-table
request:
collection: bigtableadmin.projects.instances.tables.authorizedViews
method: delete
arguments:
resource:
help_text: Cloud Bigtable authorized view to delete.
spec: !REF googlecloudsdk.command_lib.bigtable.resources:authorized_view

View File

@@ -0,0 +1,19 @@
- release_tracks: [GA, BETA, ALPHA]
help_text:
brief: Describe a Cloud Bigtable authorized view.
description: Describe a Cloud Bigtable authorized view.
examples: |
To describe the authorized view `my-authorized-view` in instance `my-instance` and table
`my-table`:
$ {command} my-authorized-view --instance=test-instance --table=test-table
request:
collection: bigtableadmin.projects.instances.tables.authorizedViews
method: get
arguments:
resource:
help_text: Cloud Bigtable authorized view to describe.
spec: !REF googlecloudsdk.command_lib.bigtable.resources:authorized_view

View File

@@ -0,0 +1,25 @@
- release_tracks: [GA, BETA, ALPHA]
help_text:
brief: Get an IAM policy on a Cloud Bigtable authorized view.
description: |
Get an IAM policy on a Cloud Bigtable authorized view.
examples: |
To get the IAM policy on the authorized view `my-authorized-view` in instance `my-instance` and table `my-table`, run:
$ {command} my-authorized-view --instance=`my-instance` --table=`my-table`
See https://cloud.google.com/iam/docs/managing-policies for more information.
request:
collection: bigtableadmin.projects.instances.tables.authorizedViews
arguments:
resource:
help_text: Cloud Bigtable authorized view to get the IAM policy for.
spec: !REF googlecloudsdk.command_lib.bigtable.resources:authorized_view
iam:
policy_version: 3
get_iam_policy_version_path: getIamPolicyRequest.options.requestedPolicyVersion

View File

@@ -0,0 +1,21 @@
- release_tracks: [GA, BETA, ALPHA]
help_text:
brief: List all authorized views of a Cloud Bigtable table.
description: List all authorized views of a Cloud Bigtable table.
examples: |
To list the authorized views in instance `my-instance` and table `my-table`:
$ {command} --instance=test-instance --table=test-table
request:
collection: bigtableadmin.projects.instances.tables.authorizedViews
method: list
response:
id_field: name
arguments:
resource:
help_text: Cloud Bigtable table for which to list all authorized views.
spec: !REF googlecloudsdk.command_lib.bigtable.resources:table

View File

@@ -0,0 +1,35 @@
- release_tracks: [GA, BETA, ALPHA]
help_text:
brief: Remove an IAM policy binding from a Cloud Bigtable authorized view.
description: |
Remove an IAM policy binding from a Cloud Bigtable authorized view. One binding consists of a member,
a role, and an optional condition.
examples: |
To remove an IAM policy binding for the role of `roles/editor` for the user `test-user@gmail.com`
with authorized view `my-authorized-view` in instance `my-instance` and table `my-table`, run:
$ {command} my-authorized-view --instance=`my-instance` --table=`my-table` --member=`user:test-user@gmail.com` --role=`roles/editor`
To remove an IAM policy binding which expires at the end of the year 2020 for the role of
`roles/bigtable.admin` and the user `test-user@gmail.com` with authorized view `my-authorized-view`
in instance `my-instance` and cluster `my-cluster`, run:
$ {command} my-authorized-view --instance=`my-instance` --table=`my-table` --member=`user:test-user@gmail.com` --role=`roles/bigtable.admin` --condition=`expression=request.time < timestamp("2021-01-01T00:00:00Z"),title=expires_end_of_2020,description=Expires at midnight on 2020-12-31`
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
iam:
enable_condition: true
policy_version: 3
get_iam_policy_version_path: getIamPolicyRequest.options.requestedPolicyVersion
request:
collection: bigtableadmin.projects.instances.tables.authorizedViews
arguments:
resource:
help_text: Cloud Bigtable authorized view to remove the IAM policy binding from.
spec: !REF googlecloudsdk.command_lib.bigtable.resources:authorized_view

View File

@@ -0,0 +1,28 @@
- release_tracks: [GA, BETA, ALPHA]
help_text:
brief: Set an IAM policy on a Cloud Bigtable authorized view.
description: |
Set an IAM policy on a Cloud Bigtable authorized view.
examples: |
To set the IAM policy from file `my-policy` on the authorized view `my-authorized-view` in
instance `my-instance` and table `my-table`, run:
$ {command} my-authorized-view --instance=`my-instance` --table=`my-table` my-policy
See https://cloud.google.com/iam/docs/managing-policies for more information.
request:
collection: bigtableadmin.projects.instances.tables.authorizedViews
modify_request_hooks:
- googlecloudsdk.command_lib.iam.hooks:UseMaxRequestedPolicyVersion:api_field=setIamPolicyRequest.policy.version
- googlecloudsdk.command_lib.iam.hooks:AddVersionToUpdateMaskIfNotPresent:update_mask_path=setIamPolicyRequest.updateMask
arguments:
resource:
help_text: Cloud Bigtable authorized view to set the IAM policy on.
spec: !REF googlecloudsdk.command_lib.bigtable.resources:authorized_view
iam:
policy_version: 3

View File

@@ -0,0 +1,77 @@
- release_tracks: [GA, BETA, ALPHA]
help_text:
brief: Update an existing Cloud Bigtable authorized view.
description: Update an existing Cloud Bigtable authorized view.
examples: |
To update the authorized view `my-authorized-view` in instance `my-instance` and table
`my-table`, using the definition file `authorized_view.json`:
$ {command} my-authorized-view --instance=test-instance --table=test-table --definition-file=authorized_view.json
To update the authorized view `my-authorized-view` in instance `my-instance` and table
`my-table`, using the pre-encoded definition file `authorized_view_pre_encoded.json`:
$ {command} my-authorized-view --instance=test-instance --table=test-table --definition-file=authorized_view_pre_encoded.json --pre-encoded
To update the authorized view `my-authorized-view` in instance `my-instance` and table
`my-table`, using the definition file `authorized_view.json` and skip the prompt to proceed or
cancel the update:
$ {command} my-authorized-view --instance=test-instance --table=test-table --definition-file=authorized_view.json --no-interactive
request:
collection: bigtableadmin.projects.instances.tables.authorizedViews
method: patch
modify_request_hooks:
- googlecloudsdk.api_lib.bigtable.authorized_views:ModifyUpdateAuthorizedViewRequest
arguments:
resource:
help_text: Cloud Bigtable authorized view to update.
spec: !REF googlecloudsdk.command_lib.bigtable.resources:authorized_view
params:
- arg_name: definition-file
help_text: |
Path to a JSON or YAML file containing a valid authorized view protobuf.
The `name` field is ignored. The name is deduced from the other command line arguments.
Example:
{
"subsetView":
{
"rowPrefixes": ["store1"],
"familySubsets":
{
"column_family_name":
{
"qualifiers":["address"],
"qualifierPrefixes":["tel"]
}
}
},
"deletionProtection": true
}
- arg_name: interactive
type: bool
default: true
help_text: |
If provided, a diff is displayed with a prompt to proceed or cancel the update.
- arg_name: pre-encoded
type: bool
default: false
help_text: |
By default, Base64 encoding is applied to all binary fields ("rowPrefixes", "qualifiers" and
"qualifierPrefixes") in the JSON or YAML definition file.
Use this to indicate that all binary fields are already Base64-encoded and should be used
directly.
- arg_name: ignore-warnings
type: bool
default: false
help_text: |
If true, changes that make the authorized view more restrictive are allowed.
async:
collection: bigtableadmin.operations