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,28 @@
# -*- coding: utf-8 -*- #
# Copyright 2018 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 command group for Google BigQuery Datasets."""
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.UniverseCompatible
class Datasets(base.Group):
"""Manage Google BigQuery datasets."""

View File

@@ -0,0 +1,26 @@
# -*- 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 managing Google BigQuery dataset configurations."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
class Config(base.Group):
"""Manage Google BigQuery dataset configurations."""

View File

@@ -0,0 +1,38 @@
release_tracks: [ALPHA]
command_type: CONFIG_EXPORT
help_text:
brief: Export the configuration for a Google BigQuery dataset.
description: |
*{command}* exports the configuration for a Google BigQuery dataset.
Dataset configurations can be exported in
Kubernetes Resource Model (krm) or Terraform HCL formats. The
default format is `krm`.
Specifying `--all` allows you to export the configurations for all
datasets within the project.
Specifying `--path` allows you to export the configuration(s) to
a local directory.
examples: |
To export the configuration for a dataset, run:
$ {command} my-dataset
To export the configuration for a dataset to a file, run:
$ {command} my-dataset --path=/path/to/dir/
To export the configuration for a dataset in Terraform
HCL format, run:
$ {command} my-dataset --resource-format=terraform
To export the configurations for all datasets within a
project, run:
$ {command} --all
arguments:
resource:
help_text: Dataset to export the configuration for.
spec: !REF googlecloudsdk.command_lib.bq.resources:dataset

View File

@@ -0,0 +1,45 @@
# Copyright 2018 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.
- release_tracks: [ALPHA]
help_text:
brief: Create a new BigQuery dataset.
description: Create a new BigQuery dataset.
examples: |
The following command creates a dataset with ID `my-dataset`
$ {command} my-dataset --description 'My New Dataset'
The following command creates a dataset with ID `my-other-dataset`, overwritting destination
if it exists:
$ {command} my-other-dataset --description 'My Other Dataset' --overwrite
request:
collection: bigquery.datasets
method: insert
modify_request_hooks:
- 'googlecloudsdk.command_lib.util.hooks.request_modifiers:SetFieldFromName:api_field=dataset.datasetReference.datasetId'
- googlecloudsdk.command_lib.bq.hooks:ProcessDatasetOverwrite
arguments:
resource:
help_text: |-
ID of the the dataset being created. The ID must contain only letters (a-z, A-Z),
numbers (0-9), or underscores ( _ ). The maximum length is 1,024 characters.
spec: !REF googlecloudsdk.command_lib.bq.resources:dataset
params:
- _REF_: googlecloudsdk.command_lib.bq.flags:dataset.description
- _REF_: googlecloudsdk.command_lib.bq.flags:permissions_file
- _REF_: googlecloudsdk.command_lib.bq.flags:overwrite

View File

@@ -0,0 +1,37 @@
# Copyright 2018 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.
- release_tracks: [ALPHA]
help_text:
brief: Delete a BigQuery dataset.
description: Delete a BigQuery dataset.
examples: |
The following command deletes a dataset with ID `my-dataset`
$ {command} my-dataset
request:
collection: bigquery.datasets
arguments:
resource:
help_text: The BigQuery dataset you want to delete.
spec: !REF googlecloudsdk.command_lib.bq.resources:dataset
params:
- api_field: deleteContents
arg_name: remove-tables
required: false
help_text: |
Remove the dataset even if it contains one or more tables. Tables will be removed
before deleteing dataset.

View File

@@ -0,0 +1,29 @@
# Copyright 2018 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.
- release_tracks: [ALPHA]
help_text:
brief: Describe a BigQuery dataset.
description: Describe a BigQuery dataset.
examples: |
The following command fetches details about a dataset with ID `my-dataset`
$ {command} my-dataset
request:
collection: bigquery.datasets
arguments:
resource:
help_text: The BigQuery dataset you want to describe.
spec: !REF googlecloudsdk.command_lib.bq.resources:dataset

View File

@@ -0,0 +1,42 @@
# Copyright 2018 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.
- release_tracks: [ALPHA]
help_text:
brief: List all BigQuery datasets in a project.
description: List all BigQuery datasets in a project.
examples: |
The following command list all datasets in current project (including hidden)
$ {command} --all
request:
collection: bigquery.datasets
arguments:
resource:
help_text: The BigQuery project you want to list datasets for.
spec: !REF googlecloudsdk.command_lib.bq.resources:project
params:
- api_field: all
arg_name: all
required: false
help_text: List even hidden datasets.
output:
format: |
table(
id,
location
)

View File

@@ -0,0 +1,35 @@
# Copyright 2018 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.
- release_tracks: [ALPHA]
help_text:
brief: Update a BigQuery dataset.
description: Update a BigQuery dataset.
examples: |
The following command updates the description on a dataset with ID `my-dataset`
$ {command} my-dataset --description 'My New Dataset Description'
request:
collection: bigquery.datasets
method: patch
arguments:
resource:
help_text: The BigQuery dataset you want to update.
spec: !REF googlecloudsdk.command_lib.bq.resources:dataset
params:
- _REF_: googlecloudsdk.command_lib.bq.flags:permissions_file
- _REF_: googlecloudsdk.command_lib.bq.flags:dataset.description