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,27 @@
# -*- coding: utf-8 -*- #
# Copyright 2021 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.
"""Command group for backups under Dataproc Metastore services."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA,
base.ReleaseTrack.GA)
class Backups(base.Group):
"""Manage backups under Dataproc Metastore services."""

View File

@@ -0,0 +1,32 @@
release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Add an IAM policy binding to a backup.
description: |
Add an IAM policy binding to a backup.
examples: |
To add an IAM policy binding for the role of 'roles/metastore.admin' for the user
'test-user@gmail.com', run:
$ {command} my-backup --member='user:test-user@gmail.com' --role='roles/metastore.admin'
See https://cloud.google.com/dataproc-metastore/docs/iam-and-access-control for details of
policy role and member types.
request:
collection: metastore.projects.locations.services.backups
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
GA:
api_version: v1
iam:
enable_condition: false
policy_version: 0
arguments:
resource:
help_text: Backup for which to add the IAM policy to.
spec: !REF googlecloudsdk.command_lib.metastore.resources:backup

View File

@@ -0,0 +1,36 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: |
Backup a service.
description: |
Backup metadata and the resource configuration of a service.
examples: |
To make a backup named `my-backup` and description `test description`
of the service `my-service`, run:
$ {command} my-backup --service=my-service --description='test description'
request:
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
GA:
api_version: v1
collection: metastore.projects.locations.services.backups
arguments:
resource:
help_text: |
Arguments and flags that specify the backup
you want to create.
spec: !REF googlecloudsdk.command_lib.metastore.resources:backup
params:
- arg_name: description
api_field: backup.description
help_text: |
The description of this backup.
async:
collection: metastore.projects.locations.operations

View File

@@ -0,0 +1,34 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: |
Delete a service backup.
description: |
Delete a backup.
If run asynchronously with `--async`, exits after printing
an operation name that can be used to poll the status of the
deletion via:
{top_command} metastore operations describe
examples: |
To delete a backup named `my-backup` from the service `my-service`, run:
$ {command} my-backup --service=my-service
request:
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
GA:
api_version: v1
collection: metastore.projects.locations.services.backups
method: delete
arguments:
resource:
help_text: Backup to delete.
spec: !REF googlecloudsdk.command_lib.metastore.resources:backup
async:
collection: metastore.projects.locations.operations

View File

@@ -0,0 +1,29 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: |
Describe a backup.
description: |
Describe a backup.
Displays all details of a backup given a valid backup ID.
examples: |
To describe a backup with the ID
`my-backup` under service `my-service`, run:
$ {command} my-backup --service=my-service
request:
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
GA:
api_version: v1
collection: metastore.projects.locations.services.backups
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.metastore.resources:backup
help_text: |
Arguments and flags that specify the backup you want
to describe.

View File

@@ -0,0 +1,34 @@
release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Get the IAM policy for the backup.
description: |
`{command}` displays the IAM policy associated with the backup.
If formatted as JSON, the output can be edited and used as a
policy file for set-iam-policy. The output includes an "etag" field
identifying the version emitted and allowing detection of
concurrent policy updates. The "etag" field should be removed to be
used as set-iam-policy input; see `{parent_command} set-iam-policy`
for additional details.
examples: |
To print the IAM policy for a given backup, run:
$ {command} my-backup
request:
collection: metastore.projects.locations.services.backups
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
GA:
api_version: v1
iam:
enable_condition: false
policy_version: 0
get_iam_policy_version_path: options_requestedPolicyVersion
arguments:
resource:
help_text: Backup for which to display the IAM policy.
spec: !REF googlecloudsdk.command_lib.metastore.resources:backup

View File

@@ -0,0 +1,41 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: |
List backups under a Dataproc Metastore service.
description: |
Lists all backups under the specified Dataproc Metastore service.
examples: |
To list all backups under service
`my-service`, run:
$ {command} --service=my-service
To list all backups under all services and
all locations, run:
$ {command} --service=- --location=-
arguments:
resource:
help_text: The service to list the backups for.
spec: !REF googlecloudsdk.command_lib.metastore.resources:service
request:
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
GA:
api_version: v1
collection: metastore.projects.locations.services.backups
response:
id_field: name
output:
format: |
table(
name.basename():label=NAME,
state:label=STATE,
createTime.date()
)

View File

@@ -0,0 +1,32 @@
release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Remove an IAM policy binding from a backup.
description: |
Remove an IAM policy binding from a backup.
examples: |
To remove an IAM policy binding for the role of 'roles/metastore.admin' for the user
'test-user@gmail.com', run:
$ {command} my-backup --member='user:test-user@gmail.com' --role='roles/metastore.admin'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
request:
collection: metastore.projects.locations.services.backups
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
GA:
api_version: v1
iam:
enable_condition: false
policy_version: 0
arguments:
resource:
help_text: Backup for which to remove the IAM policy from.
spec: !REF googlecloudsdk.command_lib.metastore.resources:backup

View File

@@ -0,0 +1,33 @@
release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Set the IAM policy for a backup.
description: |
Sets the IAM policy for the given backup as defined in a JSON or YAML file.
See https://cloud.google.com/iam/docs/managing-policies for details of
the policy file format and contents.
examples: |
The following command will read an IAM policy defined in a JSON file
'policy.json' and set it for the backup 'my-backup':
$ {command} my-backup policy.json
request:
collection: metastore.projects.locations.services.backups
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
GA:
api_version: v1
iam:
enable_condition: false
policy_version: 0
get_iam_policy_version_path: options.requestedPolicyVersion
arguments:
resource:
help_text: Backup for which to display the IAM policy.
spec: !REF googlecloudsdk.command_lib.metastore.resources:backup