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,31 @@
# -*- coding: utf-8 -*- #
# Copyright 2020 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 metadata imports under Dataproc Metastore services."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.Deprecate(
is_removed=False,
warning=(
'This command has been deprecated. '
'Please use `gcloud metastore services import` command group instead.'))
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA)
class Imports(base.Group):
"""Manage metadata imports under Dataproc Metastore services."""

View File

@@ -0,0 +1,73 @@
- release_tracks: [ALPHA, BETA]
deprecate:
is_removed: false
warning: |
This command has been deprecated.
Please use `gcloud metastore services import gcs` instead.
help_text:
brief: |
Import metadata into a service.
description: |
Import metadata with the given name and configurations in to a service.
examples: |
To import metadata with the name `my-import` and description `testing description`
into service `my-service` from a database dump with uri `gs://database-dump` and database
type `mysql`, run:
$ {command} my-import --service=my-service --description='testing description' \
--database-type=mysql --database-dump=gs://database-dump
request:
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
collection: metastore.projects.locations.services.metadataImports
arguments:
resource:
help_text: |
Arguments and flags that specify the metadata import
you want to create.
spec: !REF googlecloudsdk.command_lib.metastore.resources:import
params:
- arg_name: description
api_field: metadataImport.description
help_text: |
The description of this metadata import.
- arg_name: database-type
api_field: metadataImport.databaseDump.databaseType
help_text: |
The type of the database. If unspecified, defaults to `MYSQL`.
choices:
- arg_value: MYSQL
enum_value: MYSQL
help_text: |
MySQL Database
default: MYSQL
action:
deprecated:
removed: false
warn: |
The --database-type option is deprecated; use --database-dump-type instead.
- arg_name: database-dump-type
api_field: metadataImport.databaseDump.type
help_text: |
The type of the database dump. If unspecified, defaults to `MYSQL`
choices:
- arg_value: MYSQL
enum_value: MYSQL
help_text: |
Database dump is a MYSQL dump file.
default: MYSQL
- arg_name: database-dump
required: true
api_field: metadataImport.databaseDump.gcsUri
processor: googlecloudsdk.command_lib.metastore.validators:ValidateGcsUri:arg_name=--database-dump
help_text: |
A Cloud Storage object URI that specifies a database dump from which to import metadata.
It must begin with `gs://`.
async:
collection: metastore.projects.locations.operations

View File

@@ -0,0 +1,33 @@
- release_tracks: [ALPHA, BETA]
deprecate:
is_removed: false
warning: |
This command has been deprecated.
Please use `gcloud metastore services import` command group instead.
help_text:
brief: |
Describe a metadata import.
description: |
Describe a metadata import.
Displays all details of a metadata import given a valid import ID.
examples: |
To describe a metadata import with the ID
`my-import` under service `my-service`, run:
$ {command} my-import --service=my-service
request:
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
collection: metastore.projects.locations.services.metadataImports
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.metastore.resources:import
help_text: |
Arguments and flags that specify the metadata import you want
to describe.

View File

@@ -0,0 +1,45 @@
- release_tracks: [ALPHA, BETA]
deprecate:
is_removed: false
warning: |
This command has been deprecated.
Please use `gcloud metastore services import` command group instead.
help_text:
brief: |
List metadata imports under a Dataproc Metastore service.
description: |
Lists all metadata imports under the specified Dataproc Metastore service.
examples: |
To list all metadata imports under service
`my-service`, run:
$ {command} --service=my-service
To list all metadata imports under all services and
all locations, run:
$ {command} --service=- --location=-
arguments:
resource:
help_text: The service to list the metadata imports for.
spec: !REF googlecloudsdk.command_lib.metastore.resources:service
request:
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
collection: metastore.projects.locations.services.metadataImports
response:
id_field: name
output:
format: |
table(
name.basename():label=NAME,
state:label=STATE,
databaseDump.databaseType:label=DATABASE_TYPE,
createTime.date()
)

View File

@@ -0,0 +1,51 @@
- release_tracks: [ALPHA, BETA]
deprecate:
is_removed: false
warning: |
This command has been deprecated.
Please use `gcloud metastore services import` command group instead.
help_text:
brief: |
Update a metadata import.
description: |
Update the parameters of a metadata import. Only the description
field of a metadata import is supported to be updated.
If run asynchronously with `--async`, exits after printing
one operation name that can be used to poll the status of the
update via:
{top_command} metastore operations describe
examples: |
To update a metadata import with the name `my-metadata-import` to
have description `New description`, run:
$ {command} my-metadata-import --description="New description"
request:
ALPHA:
api_version: v1alpha
BETA:
api_version: v1beta
collection: metastore.projects.locations.services.metadataImports
modify_request_hooks:
- googlecloudsdk.command_lib.metastore.services.imports.util:UpdateDescription
arguments:
resource:
help_text: |
Arguments and flags that specify the metadata import
you want to create.
spec: !REF googlecloudsdk.command_lib.metastore.resources:import
params:
- arg_name: description
api_field: metadataImport.description
processor: googlecloudsdk.command_lib.metastore.validators:ValidateStringField:arg_name=--description
help_text: |
The description of the metadata import.
async:
collection: metastore.projects.locations.operations
update:
# b/136698204
read_modify_update: true