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 2019 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.
"""Manage taxonomies in Data Catalog."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.BETA, base.ReleaseTrack.ALPHA,
base.ReleaseTrack.GA)
class Taxonomies(base.Group):
"""Manage taxonomies in Data Catalog."""
pass

View File

@@ -0,0 +1,23 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Add an IAM policy binding to a Policy Tag Taxonomy.
description: Add an IAM policy binding to a Policy Tag Taxonomy.
examples: |
To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
with taxonomy 'TAXONOMY' in location 'LOCATION', run:
$ {command} TAXONOMY --location='LOCATION' --member='user:test-user@gmail.com' --role='roles/editor'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
request:
collection: datacatalog.projects.locations.taxonomies
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag taxonomy for which to add an IAM policy binding.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:taxonomy

View File

@@ -0,0 +1,19 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Describe a Policy Tag Taxonomy.
description: Describe a Policy Tag Taxonomy.
examples: |
To describe the Taxonomy 'TAXONOMY' in the location 'LOCATION', run:
$ {command} TAXONOMY --location='LOCATION'
request:
collection: datacatalog.projects.locations.taxonomies
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag taxonomy to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:taxonomy

View File

@@ -0,0 +1,66 @@
# -*- 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.
"""List command for gcloud debug logpoints command group."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import arg_parsers
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.data_catalog import flags
from googlecloudsdk.command_lib.data_catalog.taxonomies import taxonomies
from googlecloudsdk.core import properties
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA,
base.ReleaseTrack.GA)
class Export(base.Command):
"""Export a list of taxonomies from a certain project."""
detailed_help = {
'DESCRIPTION': """
Export a list of taxonomies from a certain project.
""",
'EXAMPLES': """
To export 'TAXONOMY1' and 'TAXONOMY2' from your project within location
LOCATION and render the export on the command line:
$ {command} "TAXONOMY1,TAXONOMY2" --location=LOCATION
To export 'TAXONOMY1' and 'TAXONOMY2' from your project within location
LOCATION and store the export into a file "/path/file.yaml":
$ {command} "TAXONOMY1,TAXONOMY2" --location=LOCATION > /path/file.yaml
""",
}
@staticmethod
def Args(parser):
flags.AddLocationResourceArg(parser, 'Location to export taxonomies from.')
parser.add_argument(
'taxonomies',
type=arg_parsers.ArgList(),
metavar='TAXONOMIES',
help="""\
List of taxonomies to bring.
""")
def Run(self, args):
"""Run the export command."""
version_label = flags.GetVersionLabel(self.ReleaseTrack())
args.project_val = properties.VALUES.core.project.Get()
return taxonomies.Export(args, version_label)

View File

@@ -0,0 +1,23 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Get the IAM policy for a Policy Tag Taxonomy.
description: |
*{command}* displays the IAM policy associated with a Policy Tag Taxonomy. 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; see $ {parent_command} set-iam-policy for additional details.
examples: |
To print the IAM policy for 'TAXONOMY' in 'LOCATION', run:
$ {command} TAXONOMY --location='LOCATION'
request:
collection: datacatalog.projects.locations.taxonomies
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag taxonomy for which to display the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:taxonomy

View File

@@ -0,0 +1,64 @@
# -*- 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.
"""List command for gcloud debug logpoints command group."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import arg_parsers
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.data_catalog import flags
from googlecloudsdk.command_lib.data_catalog.taxonomies import taxonomies
from googlecloudsdk.command_lib.data_catalog.taxonomies import util
from googlecloudsdk.core import properties
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA,
base.ReleaseTrack.GA)
class Import(base.Command):
"""Export a file with serialized taxonomies to a certain project."""
detailed_help = {
'DESCRIPTION': """
Export a file with serialized taxonomies to a certain project.
""",
'EXAMPLES': """
To parse and import the taxonomies contained in '/tmp/taxonomies.json'
to your project within location LOCATION:
$ {command} "/tmp/taxonomies.json" --location="LOCATION"
""",
}
@staticmethod
def Args(parser):
flags.AddLocationResourceArg(parser, 'Location to import taxonomies to.')
parser.add_argument(
'taxonomies',
type=arg_parsers.YAMLFileContents(),
metavar='TAXONOMIES',
help="""\
File containing serialized taxonomy.
""")
def Run(self, args):
"""Run the import command."""
version_label = flags.GetVersionLabel(self.ReleaseTrack())
args.project_val = properties.VALUES.core.project.Get()
args.taxonomies = util.ProcessTaxonomiesFromYAML(args.taxonomies,
version_label)
return taxonomies.Import(args, version_label)

View File

@@ -0,0 +1,22 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: List Cloud Policy Tag Taxonomies.
description: List Cloud Policy Tag Taxonomies.
examples: |
List the policy tag taxonomies for a location 'LOCATION':
$ {command} --location='LOCATION'
request:
collection: datacatalog.projects.locations.taxonomies
GA:
api_version: v1
response:
id_field: name
arguments:
resource:
help_text: Location in which to list policy tag taxonomies. The arguments in this group can be used to specify the attributes of this resource.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:location

View File

@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*- #
# Copyright 2019 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.
"""Manage policy tags in Data Catalog."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.BETA, base.ReleaseTrack.ALPHA,
base.ReleaseTrack.GA)
class PolicyTags(base.Group):
"""Manage policy tags in Data Catalog."""
pass

View File

@@ -0,0 +1,23 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Add an IAM policy binding to a Data Catalog policy tag.
description: Add an IAM policy binding to a Data Catalog policy tag.
examples: |
To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
with policy tag 'POLICY_TAG' in location 'LOCATION' and taxonomy 'TAXONOMY', run:
$ {command} POLICY_TAG --location='LOCATION' --taxonomy='TAXONOMY' --member='user:test-user@gmail.com' --role='roles/editor'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
request:
collection: datacatalog.projects.locations.taxonomies.policyTags
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag for which to add an IAM policy binding.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:policy_tag

View File

@@ -0,0 +1,18 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Describe a Policy Tag Manager Policy tag.
description: Describe a Policy Tag Manager Policy tag.
examples: |
To describe the Policy Tag 'POLICY_TAG' in the taxonomy 'TAXONOMY', run:
$ {command} POLICY_TAG --taxonomy='TAXONOMY' --location='LOCATION'
request:
collection: datacatalog.projects.locations.taxonomies.policyTags
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:policy_tag

View File

@@ -0,0 +1,26 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Get the IAM policy for a Data Catalog Policy Tag.
description: |
*{command}* displays the IAM policy associated with a Data Catalog Policy Tag. 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; see $ {parent_command} set-iam-policy for additional details.
examples: |
To print the IAM policy for 'POLICY_TAG' in 'LOCATION' and 'TAXONOMY', run:
$ {command} POLICY_TAG --taxonomy='TAXONOMY' --location='LOCATION'
request:
collection: datacatalog.projects.locations.taxonomies.policyTags
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag for which to display the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:policy_tag
# 3. read endor stuff
# 4. write some tests

View File

@@ -0,0 +1,22 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: List Cloud Policy Tag Manager policy tags.
description: List Cloud Policy Tag Manager policy tags.
examples: |
List the policy tags for a Cloud Policy Tag Manager taxonomy 'TAXONOMY':
$ {command} --taxonomy='TAXONOMY' --location='LOCATION'
request:
collection: datacatalog.projects.locations.taxonomies.policyTags
GA:
api_version: v1
response:
id_field: name
arguments:
resource:
help_text: Policy Tag Manager Taxonomy in which to list policy tags. The arguments in this group can be used to specify the attributes of this resource.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:taxonomy

View File

@@ -0,0 +1,29 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Remove an IAM policy binding from a Data Catalog policy tag.
description: Remove an IAM policy binding from a Data Catalog policy tag.
examples: |
To remove an IAM policy binding for the role of 'roles/editor' for the
user 'test-user@gmail.com' on policy tag 'POLICY_TAG' in location 'LOCATION'
and taxonomy 'TAXONOMY', run:
$ {command} POLICY_TAG --location='LOCATION' --taxonomy='TAXONOMY' --member='user:test-user@gmail.com' --role='roles/editor'
To remove an IAM policy binding for the role of 'roles/editor' from all
authenticated users on policy tag 'POLICY_TAG' in location 'LOCATION'
and taxonomy 'TAXONOMY', run:
$ {command} POLICY_TAG --location='LOCATION' --taxonomy='TAXONOMY' --member='allAuthenticatedUsers' --role='roles/editor'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
request:
collection: datacatalog.projects.locations.taxonomies.policyTags
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag from which to remove the IAM policy binding.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:policy_tag

View File

@@ -0,0 +1,27 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Set the IAM policy for a Data Catalog Policy Tag.
description: |
Set the IAM policy for the given Data Catalog Policy Tag as
defined in a JSON or YAML file.
examples: |
The following command will read am IAM policy defined in a JSON file
'policy.json' and set it for the Policy Tag 'POLICY_TAG' with
location 'LOCATION' in the taxonomy 'TAXONOMY':
$ {command} POLICY_TAG --location=LOCATION --taxonomy=TAXONOMY policy.json
See https://cloud.google.com/iam/docs/managing-policies for details of the
policy file format and contents.
request:
collection: datacatalog.projects.locations.taxonomies.policyTags
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag for which to set the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:policy_tag

View File

@@ -0,0 +1,27 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Remove an IAM policy binding from a policy tag taxonomy.
description: Remove an IAM policy binding from a policy tag taxonomy.
examples: |
To remove an IAM policy binding for the role of 'roles/editor' for the
user 'test-user@gmail.com' on taxonomy 'TAXONOMY' in location 'LOCATION', run:
$ {command} TAXONOMY --location='LOCATION' --member='user:test-user@gmail.com' --role='roles/editor'
To remove an IAM policy binding for the role of 'roles/editor' from all
authenticated users on taxonomy 'TAXONOMY' in location 'LOCATION', run:
$ {command} TAXONOMY --location='LOCATION' --member='allAuthenticatedUsers' --role='roles/editor'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
request:
collection: datacatalog.projects.locations.taxonomies
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag taxonomy from which to remove the IAM policy binding.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:taxonomy

View File

@@ -0,0 +1,26 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Set the IAM policy for a Policy Tag taxonomy.
description: |
Set the IAM policy for the given Policy Tag taxonomy as
defined in a JSON or YAML file.
examples: |
The following command will read am IAM policy defined in a JSON file
'policy.json' and set it for the taxonomy 'TAXONOMY' in location 'LOCATION':
$ {command} TAXONOMY --location='LOCATION' policy.json
See https://cloud.google.com/iam/docs/managing-policies for details of the
policy file format and contents.
request:
collection: datacatalog.projects.locations.taxonomies
GA:
api_version: v1
arguments:
resource:
help_text: Policy tag taxonomy for which to set the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:taxonomy