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,36 @@
# -*- 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.
"""Command groups for 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
)
@base.DefaultUniverseOnly
class DataCatalog(base.Group):
"""Manage Data Catalog resources."""
category = base.DATA_ANALYTICS_CATEGORY
def Filter(self, context, args):
# TODO(b/190530058): Determine if command group works with project number
base.RequireProjectID(args)
del context, args

View File

@@ -0,0 +1,27 @@
# -*- 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 crawler runs 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.ALPHA)
class CrawlerRuns(base.Group):
"""Manage crawler runs in Data Catalog."""
pass

View File

@@ -0,0 +1,13 @@
- release_tracks: [ALPHA]
help_text:
brief: Describe a Data Catalog crawler run.
description: Describe a Data Catalog crawler run.
request:
collection: datacatalog.projects.crawlers.crawlerRuns
api_version: v1alpha3
arguments:
resource:
help_text: Crawler run to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:crawler_run

View File

@@ -0,0 +1,17 @@
- release_tracks: [ALPHA]
help_text:
brief: List Data Catalog crawler runs.
description: List Data Catalog crawler runs.
request:
collection: datacatalog.projects.crawlers.crawlerRuns
api_version: v1alpha3
response:
id_field: name
arguments:
resource:
help_text: Crawler to list runs for.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:crawler
is_positional: true

View File

@@ -0,0 +1,14 @@
- release_tracks: [ALPHA]
help_text:
brief: Start a Data Catalog crawler run.
description: Start a Data Catalog crawler run.
request:
collection: datacatalog.projects.crawlers
method: run
api_version: v1alpha3
arguments:
resource:
help_text: Crawler to run.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:crawler

View File

@@ -0,0 +1,27 @@
# -*- 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 crawler configurations 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.ALPHA)
class Crawlers(base.Group):
"""Manage crawler configurations in Data Catalog."""
pass

View File

@@ -0,0 +1,38 @@
- release_tracks: [ALPHA]
help_text:
brief: Create a new Data Catalog crawler.
description: Create a new Data Catalog crawler.
examples: |
Create a project-scoped crawler:
$ {command} crawler1 \
--run-option=MANUAL --display-name=my-crawler --crawl-scope=PROJECT
Create a bucket-scoped crawler that runs weekly:
$ {command} crawler1 \
--display-name=my-crawler --crawl-scope=BUCKET \
--buckets="gs://bucket1,gs://bucket2,gs://bucket3" \
--run-option=SCHEDULED --run-schedule=WEEKLY
request:
collection: datacatalog.projects.crawlers
api_version: v1alpha3
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.crawlers.util:ValidateScopeFlagsForCreate
- googlecloudsdk.command_lib.data_catalog.crawlers.util:ValidateSchedulingFlagsForCreate
- googlecloudsdk.command_lib.data_catalog.crawlers.util:ParseScopeFlagsForCreate
- googlecloudsdk.command_lib.data_catalog.crawlers.util:ParseSchedulingFlagsForCreate
arguments:
resource:
help_text: The crawler to create.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:crawler
params:
- !REF googlecloudsdk.command_lib.data_catalog.crawlers.flags:crawler.description
- !REF googlecloudsdk.command_lib.data_catalog.crawlers.flags:crawler.display_name
- !REF googlecloudsdk.command_lib.data_catalog.crawlers.flags:crawler.bundle_specs
additional_arguments_hook: |-
googlecloudsdk.command_lib.data_catalog.crawlers.flags:AddCrawlerScopeAndSchedulingFlagsForCreate

View File

@@ -0,0 +1,13 @@
- release_tracks: [ALPHA]
help_text:
brief: Delete a Data Catalog crawler.
description: Delete a Data Catalog crawler.
request:
collection: datacatalog.projects.crawlers
api_version: v1alpha3
arguments:
resource:
help_text: The crawler to delete.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:crawler

View File

@@ -0,0 +1,13 @@
- release_tracks: [ALPHA]
help_text:
brief: Describe a Data Catalog crawler.
description: Describe a Data Catalog crawler.
request:
collection: datacatalog.projects.crawlers
api_version: v1alpha3
arguments:
resource:
help_text: The crawler to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:crawler

View File

@@ -0,0 +1,16 @@
- release_tracks: [ALPHA]
help_text:
brief: List Data Catalog crawlers.
description: List Data Catalog crawlers.
request:
collection: datacatalog.projects.crawlers
api_version: v1alpha3
response:
id_field: name
arguments:
resource:
help_text: The project in which to list crawlers.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:project

View File

@@ -0,0 +1,57 @@
- release_tracks: [ALPHA]
help_text:
brief: Update a Data Catalog crawler.
description: Update a Data Catalog crawler.
examples: |
Update the display name of a crawler:
$ {command} crawler1 --display-name="my-crawler"
Add buckets to a BUCKET-scoped crawler:
$ {command} crawler1 --add-buckets=bucket1,bucket2
Remove buckets from a BUCKET-scoped crawler:
$ {command} crawler1 --remove-buckets=bucket1,bucket2
Overwrite buckets in a BUCKET-scoped crawler with bucket1, bucket2:
$ {command} crawler1 --clear-buckets --add-buckets=bucker1,bucket2
Change the schedule of a manual crawler to run daily:
$ {command} crawler1 --run-option=SCHEDULED --run-schedule=DAILY
request:
collection: datacatalog.projects.crawlers
api_version: v1alpha3
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.crawlers.util:ValidateAndParseFlagsForUpdate
- googlecloudsdk.command_lib.data_catalog.crawlers.util:SetUpdateMask
arguments:
resource:
help_text: The crawler to update.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:crawler
params:
- !REF googlecloudsdk.command_lib.data_catalog.crawlers.flags:crawler.description
- !REF googlecloudsdk.command_lib.data_catalog.crawlers.flags:crawler.display_name
- group:
help_text: |-
Update bundling specifications. Bundling specifications direct the crawler to bundle files
into filesets based on the patterns provided:
params:
- !REF googlecloudsdk.command_lib.data_catalog.crawlers.flags:crawler.add_bundle_specs
- group:
mutex: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.crawlers.flags:crawler.remove_bundle_specs
- !REF googlecloudsdk.command_lib.data_catalog.crawlers.flags:crawler.clear_bundle_specs
additional_arguments_hook: |-
googlecloudsdk.command_lib.data_catalog.crawlers.flags:AddCrawlerScopeAndSchedulingFlagsForUpdate
update:
disable_auto_field_mask: true

View File

@@ -0,0 +1,31 @@
# -*- 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 entries 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
)
@base.DefaultUniverseOnly
class Entries(base.Group):
"""Manage entries in Data Catalog."""
pass

View File

@@ -0,0 +1,213 @@
- release_tracks: [GA]
help_text:
brief: Create a Data Catalog entry.
description: Create a Data Catalog entry.
examples: |-
To create an entry for a Google Cloud Storage fileset, run:
$ {command} entry1 \
--location=us-central1 --entry-group=group1 \
--gcs-file-patterns="gs://bucket1/abc/*,gs://bucket1/file1" \
--display-name="analytics data" --type=FILESET
To create an entry for a Google Cloud Storage fileset with an inline schema, run:
$ {command} entry1 \
--location=us-central1 --entry-group=group1 \
--gcs-file-patterns="gs://bucket1/*" --display-name="sales data" \
--schema="qtr=STRING,sales=FLOAT,year=STRING"
To create an entry for a resource of a custom type, run:
$ {command} entry1 \
--location=us-central1 --entry-group=group1 \
--display-name="sales data" --linked-resource="www.resource.com" \
--user-specified-type="type_name" --user-specified-system="system_name"
To create an entry for a Google Cloud Storage fileset with a schema from a file, run:
$ {command} entry1 \
--location=us-central1 --entry-group=group1 \
--gcs-file-patterns="gs://bucket1/*" --display-name="sales data" \
--schema-from-file=/tmp/schema.json --type=FILESET
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups.entries
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.entries.v1_util:DetectType
- googlecloudsdk.command_lib.data_catalog.entries.v1_util:ParseFilesetRequirements
- googlecloudsdk.command_lib.data_catalog.entries.v1_util:ParsePhysicalSchema
arguments:
resource:
help_text: Entry to create.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:display_name
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:description
- group:
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:fully_qualified_name
- group:
mutex: true
required: true
help_text: |
Types can either be specified as a built-in type or described as a custom type.
params:
- group:
help_text: |
Built-in type can be specified for an entry. For types FILESET,
a file pattern must be specified.
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:type
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:gcs_file_patterns
- group:
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:required_user_specified_system
- group:
mutex: true
required: true
params:
- group:
help_text: |
For externally ingested resources, `--user-specified-type` and `--user-specified-system`
are required. Linked resource and source system time stamps are optional.
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:required_user_specified_type
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:linked_resource
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:source_system_create_time
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:source_system_update_time
- group:
hidden: true
help_text: |
Create a Kafka Cluster entry.
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:kafka_cluster_bootstrap_servers_required
- group:
hidden: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:kafka_cluster_required
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:kafka_topic_required
- group:
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:physical_schema_type
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:physical_schema_file
- group:
mutex: true
help_text: |
Column schema for the entry. A schema consists of a list of column names along with
their types, descriptions, modes, and nested subcolumns. For example:
```
- column: first_name
description: First name
mode: REQUIRED
type: STRING
- column: last_name
description: Last name
mode: REQUIRED
type: STRING
- column: addresses
description: Addresses
mode: REPEATED
type: RECORD
subcolumns:
- column: city
description: City
mode: NULLABLE
type: STRING
- column: state
description: State
mode: NULLABLE
type: STRING
```
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:schema
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:schema_from_file
- release_tracks: [ALPHA, BETA]
help_text:
brief: Create a Data Catalog entry.
description: Create a Data Catalog entry.
examples: |-
To create an entry for a Google Cloud Storage fileset, run:
$ {command} entry1 \
--location=us-central1 --entry-group=group1 \
--gcs-file-patterns="gs://bucket1/abc/*,gs://bucket1/file1" \
--display-name="analytics data"
To create an entry for a Google Cloud Storage fileset with an inline schema, run:
$ {command} entry1 \
--location=us-central1 --entry-group=group1 \
--gcs-file-patterns="gs://bucket1/*" --display-name="sales data" \
--schema="qtr=STRING,sales=FLOAT,year=STRING"
To create an entry for a Google Cloud Storage fileset with a schema from a file, run:
$ {command} entry1 \
--location=us-central1 --entry-group=group1 \
--gcs-file-patterns="gs://bucket1/*" --display-name="sales data" \
--schema-from-file=/tmp/schema.json
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
collection: datacatalog.projects.locations.entryGroups.entries
static_fields:
googleCloudDatacatalogV1beta1Entry.type: FILESET
arguments:
resource:
help_text: Entry to create.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:display_name
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:description
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:gcs_file_patterns
- group:
mutex: true
help_text: |
Column schema for the entry. A schema consists of a list of column names along with
their types, descriptions, modes, and nested subcolumns. For example:
```
- column: first_name
description: First name
mode: REQUIRED
type: STRING
- column: last_name
description: Last name
mode: REQUIRED
type: STRING
- column: addresses
description: Addresses
mode: REPEATED
type: RECORD
subcolumns:
- column: city
description: City
mode: NULLABLE
type: STRING
- column: state
description: State
mode: NULLABLE
type: STRING
```
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:schema
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:schema_from_file

View File

@@ -0,0 +1,48 @@
- release_tracks: [GA]
help_text:
brief: Delete a Data Catalog entry.
description: Delete a Data Catalog entry.
examples: |-
To delete the entry 'entry1' in the group 'group1', run:
$ {command} entry1 \
--entry-group=group1 --location=us-central1
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups.entries
arguments:
resource:
help_text: Entry to delete.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: true
- release_tracks: [ALPHA, BETA]
help_text:
brief: Delete a Data Catalog entry.
description: Delete a Data Catalog entry.
examples: |-
To delete the entry 'entry1' in the group 'group1', run:
$ {command} entry1 \
--entry-group=group1 --location=us-central1
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
collection: datacatalog.projects.locations.entryGroups.entries
arguments:
resource:
help_text: Entry to delete.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: true

View File

@@ -0,0 +1,48 @@
- release_tracks: [GA]
help_text:
brief: Describe a Data Catalog entry.
description: Describe a Data Catalog entry.
examples: |-
To describe the entry 'entry1' in the group 'group1', run:
$ {command} entry1 \
--entry-group=group1 --location=us-central1
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups.entries
arguments:
resource:
help_text: Entry to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: true
- release_tracks: [ALPHA, BETA]
help_text:
brief: Describe a Data Catalog entry.
description: Describe a Data Catalog entry.
examples: |-
To describe the entry 'entry1' in the group 'group1', run:
$ {command} entry1 \
--entry-group=group1 --location=us-central1
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
collection: datacatalog.projects.locations.entryGroups.entries
arguments:
resource:
help_text: Entry to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: true

View File

@@ -0,0 +1,52 @@
- release_tracks: [GA]
help_text:
brief: List all entries in a Data Catalog entry group.
description: List all entries in a Data Catalog entry group.
examples: |-
To list all entry in the group 'group1', run:
$ {command} --entry-group=group1 --location=us-central1
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups.entries
response:
id_field: name
arguments:
resource:
help_text: The entry group to list.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: false
- release_tracks: [ALPHA, BETA]
help_text:
brief: List all entries in a Data Catalog entry group.
description: List all entries in a Data Catalog entry group.
examples: |-
To list all entry in the group 'group1', run:
$ {command} --entry-group=group1 --location=us-central1
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
collection: datacatalog.projects.locations.entryGroups.entries
response:
id_field: name
arguments:
resource:
help_text: The entry group to list.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: false

View File

@@ -0,0 +1,74 @@
- release_tracks: [GA]
help_text:
brief: Lookup a Data Catalog entry by its target name.
description: Lookup a Data Catalog entry by its target name.
examples: |-
To lookup the entry for a Cloud Pub/Sub topic by its Google Cloud Platform resource name, run:
$ {command} //pubsub.googleapis.com/projects/project1/topics/topic1
To lookup the entry for a Cloud Pub/Sub topic by its SQL name, run:
$ {command} 'pubsub.topic.`my-project1`.topic1'
To lookup the entry for a BigQuery table by its SQL name, run:
$ {command} 'bigquery.table.`my-project1`.my_dataset.my_table'
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
api_version: v1
collection: datacatalog.entries
method: lookup
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.entries.v1_util:ParseResourceIntoLookupRequest
arguments:
params:
- arg_name: resource
is_positional: true
help_text: |-
The name of the target resource to lookup. This can be either the Google Cloud Platform
resource name or the SQL name of a Google Cloud Platform resource. SQL names follow Standard
SQL lexical structure: https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical
- release_tracks: [ALPHA, BETA]
help_text:
brief: Lookup a Data Catalog entry by its target name.
description: Lookup a Data Catalog entry by its target name.
examples: |-
To lookup the entry for a Cloud Pub/Sub topic by its Google Cloud Platform resource name, run:
$ {command} //pubsub.googleapis.com/projects/project1/topics/topic1
To lookup the entry for a Cloud Pub/Sub topic by its SQL name, run:
$ {command} 'pubsub.topic.`my-project1`.topic1'
To lookup the entry for a BigQuery table by its SQL name, run:
$ {command} 'bigquery.table.`my-project1`.my_dataset.my_table'
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
collection: datacatalog.entries
method: lookup
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.entries.util:ParseResourceIntoLookupRequest
arguments:
params:
- arg_name: resource
is_positional: true
help_text: |-
The name of the target resource to lookup. This can be either the Google Cloud Platform
resource name or the SQL name of a Google Cloud Platform resource. SQL names follow Standard
SQL lexical structure: https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical

View File

@@ -0,0 +1,30 @@
release_tracks: [GA]
command_type: GENERIC
help_text:
brief: Star a Data Catalog entry.
description: Star a Data Catalog entry.
examples: |-
To star the entry 'entry1' in the group 'group1', run:
$ {command} entry1 \
--entry-group=group1 --location=us-central1
deprecate:
is_removed: false
warning: "This command is deprecated."
error: "This command has been removed."
request:
api_version: v1
method: star
collection: datacatalog.projects.locations.entryGroups.entries
arguments:
resource:
help_text: Entry to star.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: true
response:
modify_response_hooks:
- googlecloudsdk.command_lib.data_catalog.entries.util:LogStarSuccess

View File

@@ -0,0 +1,30 @@
release_tracks: [GA]
command_type: GENERIC
help_text:
brief: Unstar a Data Catalog entry.
description: Unstar a Data Catalog entry.
examples: |-
To unstar the entry 'entry1' in the group 'group1', run:
$ {command} entry1 \
--entry-group=group1 --location=us-central1
deprecate:
is_removed: false
warning: "This command is deprecated."
error: "This command has been removed."
request:
api_version: v1
method: unstar
collection: datacatalog.projects.locations.entryGroups.entries
arguments:
resource:
help_text: Entry to unstar.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: true
response:
modify_response_hooks:
- googlecloudsdk.command_lib.data_catalog.entries.util:LogUnstarSuccess

View File

@@ -0,0 +1,202 @@
- release_tracks: [GA]
help_text:
brief: Update a Data Catalog entry.
description: |-
Update a Data Catalog entry. The entry to update can either be specified directly, or
the `--lookup-entry` flag may be used to update the entry corresponding to the lookup of the
given resource.
examples: |-
To update the schema of a Cloud Pub/Sub entry inline, run:
$ {command} entry1 \
--location=global --entry-group=@pubsub \
--schema="column1=type1,column2=type2"
To update the schema of a Cloud Pub/Sub entry from a file, run:
$ {command} entry1 \
--location=global --entry-group=@pubsub \
--schema-from-file="/tmp/schema.json"
To lookup the entry of a Cloud Pub/Sub topic by its SQL name and update its schema in one command, run:
$ {command} \
--lookup-entry='pubsub.topic.`my-project1`.topic1' \
--schema="column1=type1,column2=type2"
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups.entries
display_resource_type: entry
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.entries.v1_util:LookupAndParseEntry
- googlecloudsdk.command_lib.data_catalog.entries.v1_util:CorrectUpdateMask
- googlecloudsdk.command_lib.data_catalog.entries.v1_util:MergeGcsFilePatterns
- googlecloudsdk.command_lib.data_catalog.entries.v1_util:ParsePhysicalSchema
arguments:
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:description
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:display_name
- group:
mutex: true
help_text: |
New column schema for the entry. A schema consists of a list of column names along with
their types, descriptions, modes, and nested subcolumns. For example:
```
- column: first_name
description: First name
mode: REQUIRED
type: STRING
- column: last_name
description: Last name
mode: REQUIRED
type: STRING
- column: addresses
description: Addresses
mode: REPEATED
type: RECORD
subcolumns:
- column: city
description: City
mode: NULLABLE
type: STRING
- column: state
description: State
mode: NULLABLE
type: STRING
```
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:schema
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:schema_from_file
- group:
mutex: true
params:
- group:
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:add_file_patterns
- group:
mutex: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:remove_file_patterns
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:clear_file_patterns
- group:
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:user_specified_type
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:user_specified_system
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:linked_resource
- group:
hidden: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:kafka_cluster_bootstrap_servers
- group:
hidden: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:kafka_cluster
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:kafka_topic
- group:
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:physical_schema_type
- !REF googlecloudsdk.command_lib.data_catalog.entries.v1_flags:physical_schema_file
additional_arguments_hook: |-
googlecloudsdk.command_lib.data_catalog.entries.flags:AddEntryUpdateArgs
- release_tracks: [ALPHA, BETA]
help_text:
brief: Update a Data Catalog entry.
description: |-
Update a Data Catalog entry. The entry to update can either be specified directly, or
the `--lookup-entry` flag may be used to update the entry corresponding to the lookup of the
given resource.
examples: |-
To update the schema of a Cloud Pub/Sub entry inline, run:
$ {command} entry1 \
--location=global --entry-group=@pubsub \
--schema="column1=type1,column2=type2"
To update the schema of a Cloud Pub/Sub entry from a file, run:
$ {command} entry1 \
--location=global --entry-group=@pubsub \
--schema-from-file="/tmp/schema.json"
To lookup the entry of a Cloud Pub/Sub topic by its SQL name and update its schema in one command, run:
$ {command} \
--lookup-entry='pubsub.topic.`my-project1`.topic1' \
--schema="column1=type1,column2=type2"
deprecate:
is_removed: false
warning: "This command is deprecated. Please use `gcloud dataplex entries` instead."
error: "This command has been removed. Please use `gcloud dataplex entries` instead."
request:
collection: datacatalog.projects.locations.entryGroups.entries
display_resource_type: entry
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.entries.util:LookupAndParseEntry
- googlecloudsdk.command_lib.data_catalog.entries.util:CorrectUpdateMask
- googlecloudsdk.command_lib.data_catalog.entries.util:MergeGcsFilePatterns
arguments:
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:description
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:display_name
- group:
mutex: true
help_text: |
New column schema for the entry. A schema consists of a list of column names along with
their types, descriptions, modes, and nested subcolumns. For example:
```
- column: first_name
description: First name
mode: REQUIRED
type: STRING
- column: last_name
description: Last name
mode: REQUIRED
type: STRING
- column: addresses
description: Addresses
mode: REPEATED
type: RECORD
subcolumns:
- column: city
description: City
mode: NULLABLE
type: STRING
- column: state
description: State
mode: NULLABLE
type: STRING
```
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:schema
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:schema_from_file
- group:
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:add_file_patterns
- group:
mutex: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:remove_file_patterns
- !REF googlecloudsdk.command_lib.data_catalog.entries.flags:clear_file_patterns
additional_arguments_hook: |-
googlecloudsdk.command_lib.data_catalog.entries.flags:AddEntryUpdateArgs

View File

@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*- #
# Copyright 2019 Google Inc. 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 entry groups in Data Catalog."""
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 is deprecated. '
'Please use `gcloud dataplex entry-groups` instead.'
),
error=(
'This command has been removed. '
'Please use `gcloud dataplex entry-groups` instead.'
),
)
@base.ReleaseTracks(
base.ReleaseTrack.BETA, base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA
)
@base.DefaultUniverseOnly
class EntryGroups(base.Group):
"""Manage entry groups in Data Catalog."""
pass

View File

@@ -0,0 +1,46 @@
- release_tracks: [GA]
help_text:
brief: Add an IAM policy binding to a Data Catalog entry group.
description: Add an IAM policy binding to a Data Catalog entry group.
examples: |
To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
with entry group 'group1' and location 'us-central1', run:
$ {command} group1 --location='us-central1' --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:
api_version: v1
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group for which to add an IAM policy binding.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
- release_tracks: [ALPHA, BETA]
help_text:
brief: Add an IAM policy binding to a Data Catalog entry group.
description: Add an IAM policy binding to a Data Catalog entry group.
examples: |
To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
with entry group 'group1' and location 'us-central1', run:
$ {command} group1 --location='us-central1' --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.entryGroups
arguments:
resource:
help_text: Entry group for which to add an IAM policy binding.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true

View File

@@ -0,0 +1,46 @@
- release_tracks: [GA]
help_text:
brief: Create a Data Catalog entry group.
description: Create a Data Catalog entry group.
examples: |-
To create an entry group for some data, run:
$ {command} group1 \
--location=us-central1 --display-name="analytics data - jan 2011" \
--description="Entries related to January 2011 analytics data."
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group to create.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entry_groups.v1_flags:display_name
- !REF googlecloudsdk.command_lib.data_catalog.entry_groups.v1_flags:description
- release_tracks: [ALPHA, BETA]
help_text:
brief: Create a Data Catalog entry group.
description: Create a Data Catalog entry group.
examples: |-
To create an entry group for some data, run:
$ {command} group1 \
--location=us-central1 --display-name="analytics data - jan 2011" \
--description="Entries related to January 2011 analytics data."
request:
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group to create.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entry_groups.flags:display_name
- !REF googlecloudsdk.command_lib.data_catalog.entry_groups.flags:description

View File

@@ -0,0 +1,36 @@
- release_tracks: [GA]
help_text:
brief: Delete a Data Catalog entry group.
description: Delete a Data Catalog entry group.
examples: |-
To delete an entry group for some data, run:
$ {command} group1 --location=us-central1
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group to delete.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
- release_tracks: [ALPHA, BETA]
help_text:
brief: Delete a Data Catalog entry group.
description: Delete a Data Catalog entry group.
examples: |-
To delete an entry group for some data, run:
$ {command} group1 --location=us-central1
request:
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group to delete.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true

View File

@@ -0,0 +1,36 @@
- release_tracks: [GA]
help_text:
brief: Describe a Data Catalog entry group.
description: Describe a Data Catalog entry group.
examples: |-
To describe an entry group for some data, run:
$ {command} group1 --location=us-central1
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
- release_tracks: [ALPHA, BETA]
help_text:
brief: Describe a Data Catalog entry group.
description: Describe a Data Catalog entry group.
examples: |-
To describe an entry group for some data, run:
$ {command} group1 --location=us-central1
request:
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true

View File

@@ -0,0 +1,46 @@
- release_tracks: [GA]
help_text:
brief: Get the IAM policy for a Data Catalog entry group.
description: |
*{command}* displays the IAM policy associated with a Data Catalog entry group. 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 entry group 'group1' in 'us-central1', run:
$ {command} --location=us-central1 group1
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group for which to display the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
- release_tracks: [ALPHA, BETA]
help_text:
brief: Get the IAM policy for a Data Catalog entry group.
description: |
*{command}* displays the IAM policy associated with a Data Catalog entry group. 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 entry group 'group1' in 'us-central1', run:
$ {command} --location=us-central1 group1
request:
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group for which to display the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true

View File

@@ -0,0 +1,40 @@
- release_tracks: [ALPHA, BETA]
help_text:
brief: List all entry groups in a Data Catalog location.
description: List all entries in a Data Catalog location.
examples: |-
To list all entry groups in us-central1, run:
$ {command} --location=us-central1
request:
collection: datacatalog.projects.locations.entryGroups
response:
id_field: name
arguments:
resource:
help_text: The location to list entry groups from.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:location
- release_tracks: [GA]
help_text:
brief: List all entry groups in a Data Catalog location.
description: List all entries in a Data Catalog location.
examples: |-
To list all entry groups in us-central1, run:
$ {command} --location=us-central1
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups
response:
id_field: name
arguments:
resource:
help_text: The location to list entry groups from.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:location

View File

@@ -0,0 +1,58 @@
- release_tracks: [GA]
help_text:
brief: Remove an IAM policy binding from a Data Catalog entry group.
description: Remove an IAM policy binding from a Data Catalog entry group.
examples: |
To remove an IAM policy binding for the role of 'roles/editor' for the
user 'test-user@gmail.com' on entry group 'group1' with location
'us-central1', run:
$ {command} --location=us-central1 group1 --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 entry group 'group1' with location
'us-central1', run:
$ {command} --location=us-central1 group1 --member='allAuthenticatedUsers' --role='roles/editor'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group from which to remove the IAM policy binding.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
- release_tracks: [ALPHA, BETA]
help_text:
brief: Remove an IAM policy binding from a Data Catalog entry group.
description: Remove an IAM policy binding from a Data Catalog entry group.
examples: |
To remove an IAM policy binding for the role of 'roles/editor' for the
user 'test-user@gmail.com' on entry group 'group1' with location
'us-central1', run:
$ {command} --location=us-central1 group1 --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 entry group 'group1' with location
'us-central1', run:
$ {command} --location=us-central1 group1 --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.entryGroups
arguments:
resource:
help_text: Entry group from which to remove the IAM policy binding.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true

View File

@@ -0,0 +1,54 @@
- release_tracks: [GA]
help_text:
brief: Set the IAM policy for a Data Catalog entry group.
description: |
Set the IAM policy for the given Data Catalog entry group 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 entry group 'group1' with
location 'us-central1':
$ {command} group1 --location=us-central1 policy.json
See https://cloud.google.com/iam/docs/managing-policies for details of the
policy file format and contents.
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group for which to set the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
- release_tracks: [ALPHA, BETA]
help_text:
brief: Set the IAM policy for a Data Catalog entry group.
description: |
Set the IAM policy for the given Data Catalog entry group 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 entry group 'group1' with
location 'us-central1':
$ {command} group1 --location=us-central1 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.entryGroups
arguments:
resource:
help_text: Entry group for which to set the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true

View File

@@ -0,0 +1,46 @@
- release_tracks: [GA]
help_text:
brief: Update a Data Catalog entry group.
description: |-
Update a Data Catalog entry group.
examples: |-
To update the description of entry group 'group1' , run:
$ {command} group1 \
--location=us-central1 --description="new description"
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group to update.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entry_groups.v1_flags:display_name
- !REF googlecloudsdk.command_lib.data_catalog.entry_groups.v1_flags:description
- release_tracks: [ALPHA, BETA]
help_text:
brief: Update a Data Catalog entry group.
description: |-
Update a Data Catalog entry group.
examples: |-
To update the description of entry group 'group1' , run:
$ {command} group1 \
--location=us-central1 --description="new description"
request:
collection: datacatalog.projects.locations.entryGroups
arguments:
resource:
help_text: Entry group to update.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry_group
is_positional: true
params:
- !REF googlecloudsdk.command_lib.data_catalog.entry_groups.flags:display_name
- !REF googlecloudsdk.command_lib.data_catalog.entry_groups.flags:description

View File

@@ -0,0 +1,172 @@
# -*- 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.
"""List command for gcloud debug logpoints command group."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import sys
from googlecloudsdk.calliope import arg_parsers
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.data_catalog import search
@base.Deprecate(
is_removed=False,
warning=(
'This command is deprecated. '
'Please use `gcloud dataplex entries search` instead.'
),
error=(
'This command has been removed. '
'Please use `gcloud dataplex entries search` instead.'
),
)
@base.ReleaseTracks(base.ReleaseTrack.GA)
@base.DefaultUniverseOnly
class Search(base.Command):
"""Search Data Catalog for resources that match a query."""
detailed_help = {
'DESCRIPTION': """\
Search Data Catalog for resources that match a query.
""",
'EXAMPLES': """\
To search project 'my-project' for Data Catalog resources that
match the simple predicate 'foo':
$ {command} 'foo' --include-project-ids=my-project
To search organization '1234' for Data Catalog resources that
match entities whose names match the predicate 'foo':
$ {command} 'name:foo' --include-organization-ids=1234
""",
}
@staticmethod
def Args(parser):
parser.add_argument(
'query',
help="""\
Query string in search query syntax in Data Catalog. For more
information, see:
https://cloud.google.com/data-catalog/docs/how-to/search-reference
""",
)
parser.add_argument(
'--limit',
type=arg_parsers.BoundedInt(1, sys.maxsize, unlimited=True),
require_coverage_in_tests=False,
category=base.LIST_COMMAND_FLAGS,
help="""\
Maximum number of resources to list. The default is *unlimited*.
""",
)
parser.add_argument(
'--page-size',
type=arg_parsers.BoundedInt(1, sys.maxsize, unlimited=True),
require_coverage_in_tests=False,
category=base.LIST_COMMAND_FLAGS,
help="""\
Some services group resource list output into pages. This flag specifies
the maximum number of resources per page.
""",
)
parser.add_argument(
'--order-by',
require_coverage_in_tests=False,
category=base.LIST_COMMAND_FLAGS,
help="""\
Specifies the ordering of results. Defaults to 'relevance'.
Currently supported case-sensitive choices are:
* relevance
* last_access_timestamp [asc|desc]: defaults to descending.
* last_modified_timestamp [asc|desc]: defaults to descending.
To order by last modified timestamp ascending, specify:
`--order-by="last_modified_timestamp desc"`.
""",
)
scope_group = parser.add_argument_group(
'Scope. Control the scope of the search.', required=True
)
scope_group.add_argument(
'--include-gcp-public-datasets',
action='store_true',
help="""\
If True, include Google Cloud Platform public datasets in the search
results.
""",
)
scope_group.add_argument(
'--include-project-ids',
type=arg_parsers.ArgList(),
metavar='PROJECT',
help="""\
List of Cloud Project IDs to include in the search.
""",
)
scope_group.add_argument(
'--include-organization-ids',
type=arg_parsers.ArgList(),
metavar='ORGANIZATION',
help="""\
List of Cloud Organization IDs to include in the search.
""",
)
scope_group.add_argument(
'--restricted-locations',
type=arg_parsers.ArgList(),
metavar='LOCATION',
help="""\
List of locations to search within.
""",
)
def Run(self, args):
"""Run the search command."""
version_label = 'v1'
return search.Search(args, version_label)
@base.Deprecate(
is_removed=False,
warning=(
'This command is deprecated. '
'Please use `gcloud dataplex entries search` instead.'
),
error=(
'This command has been removed. '
'Please use `gcloud dataplex entries search` instead.'
),
)
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA)
class SearchBeta(Search):
__doc__ = Search.__doc__
def Run(self, args):
"""Run the search command."""
version_label = 'v1beta1'
return search.Search(args, version_label)

View File

@@ -0,0 +1,40 @@
# -*- 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 tag templates in Data Catalog."""
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 is deprecated. '
'Please use `gcloud dataplex aspect-types` instead.'
),
error=(
'This command has been removed. '
'Please use `gcloud dataplex aspect-types` instead.'
),
)
@base.ReleaseTracks(base.ReleaseTrack.BETA, base.ReleaseTrack.ALPHA,
base.ReleaseTrack.GA)
@base.DefaultUniverseOnly
class TagTemplates(base.Group):
"""Manage tag templates in Data Catalog."""
pass

View File

@@ -0,0 +1,44 @@
- release_tracks: [GA]
help_text:
brief: Add IAM policy binding to a Data Catalog tag template.
description: Add IAM policy binding to a Data Catalog tag template.
examples: |
To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
with tag template 'my-tag-template' and location 'us-central1', run:
$ {command} my-tag-template --location='us-central1' --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:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template for which to add IAM policy binding to.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
- release_tracks: [ALPHA, BETA]
help_text:
brief: Add IAM policy binding to a Data Catalog tag template.
description: Add IAM policy binding to a Data Catalog tag template.
examples: |
To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
with tag template 'my-tag-template' and location 'us-central1', run:
$ {command} my-tag-template --location='us-central1' --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.tagTemplates
arguments:
resource:
help_text: Tag template for which to add IAM policy binding to.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template

View File

@@ -0,0 +1,76 @@
- release_tracks: [GA]
help_text:
brief: Create a Data Catalog tag template.
description: Create a Data Catalog tag template.
examples: |
Create a string tag template with a required string field:
$ {command} TEMPLATE --field=id=ID,display-name=DISPLAY,type=string,required=TRUE
Create an enum tag template with an optional enum field with values 'A' and 'B':
$ {command} TEMPLATE --field=id=ID,display-name=DISPLAY,type='enum(A|B)'
Create a tag template with a optional string field and a required enum field with
values 'A' and 'B':
$ {command} TEMPLATE \
--field=id=ID1,display-name=DISPLAY1,type=string \
--field=id=ID2,display-name=DISPLAY2,type='enum(A|B)',required=TRUE
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tag_templates.util:UpdateCreateTagTemplateRequestWithInputV1
arguments:
additional_arguments_hook: googlecloudsdk.command_lib.data_catalog.tag_templates.flags:AddCreateTagTemplateFlags
resource:
help_text: Tag template to create.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
params:
- api_field: googleCloudDatacatalogV1TagTemplate.displayName
arg_name: display-name
help_text: Human-readable name for the tag template.
- release_tracks: [ALPHA, BETA]
help_text:
brief: Create a Data Catalog tag template.
description: Create a Data Catalog tag template.
examples: |
Create a string tag template with a required string field:
$ {command} TEMPLATE --field=id=ID,display-name=DISPLAY,type=string,required=TRUE
Create an enum tag template with an optional enum field with values 'A' and 'B':
$ {command} TEMPLATE --field=id=ID,display-name=DISPLAY,type='enum(A|B)'
Create a tag template with a optional string field and a required enum field with
values 'A' and 'B':
$ {command} TEMPLATE \
--field=id=ID1,display-name=DISPLAY1,type=string \
--field=id=ID2,display-name=DISPLAY2,type='enum(A|B)',required=TRUE
request:
collection: datacatalog.projects.locations.tagTemplates
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tag_templates.util:UpdateCreateTagTemplateRequestWithInput
arguments:
additional_arguments_hook: googlecloudsdk.command_lib.data_catalog.tag_templates.flags:AddCreateTagTemplateFlags
resource:
help_text: Tag template to create.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
params:
- api_field: googleCloudDatacatalogV1beta1TagTemplate.displayName
arg_name: display-name
help_text: Human-readable name for the tag template.

View File

@@ -0,0 +1,46 @@
- release_tracks: [GA]
help_text:
brief: Delete a Data Catalog tag template.
description: Delete a Data Catalog tag template.
examples: |
Delete a tag template:
$ {command} TEMPLATE
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template to delete.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
params:
- api_field: force
arg_name: force
help_text: If True, any tags with this tag template will be deleted.
- release_tracks: [ALPHA, BETA]
help_text:
brief: Delete a Data Catalog tag template.
description: Delete a Data Catalog tag template.
examples: |
Delete a tag template:
$ {command} TEMPLATE
request:
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template to delete.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
params:
- api_field: force
arg_name: force
help_text: If True, any tags with this tag template will be deleted.

View File

@@ -0,0 +1,36 @@
- release_tracks: [GA]
help_text:
brief: Describe a Data Catalog tag template.
description: Describe a Data Catalog tag template.
examples: |
Describe a tag template:
$ {command} TEMPLATE
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
- release_tracks: [ALPHA, BETA]
help_text:
brief: Describe a Data Catalog tag template.
description: Describe a Data Catalog tag template.
examples: |
Describe a tag template:
$ {command} TEMPLATE
request:
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template to describe.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template

View File

@@ -0,0 +1,31 @@
# -*- 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 tag template fields 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
)
@base.DefaultUniverseOnly
class TagTemplateFields(base.Group):
"""Manage tag template fields in Data Catalog."""
pass

View File

@@ -0,0 +1,78 @@
- release_tracks: [GA]
help_text:
brief: Create a Data Catalog tag template field.
description: Create a Data Catalog tag template field.
examples: |
Create a string tag template field:
$ {command} create FIELD --display-name=DISPLAY --type=string
Create an enum tag template field with values 'A' and 'B':
$ {command} FIELD --display-name=DISPLAY --type="enum(A|B)"
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates.fields
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tag_templates.util:UpdateCreateTagTemplateFieldRequestWithInputV1
arguments:
resource:
help_text: Tag template field to create.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template_field
params:
- api_field: googleCloudDatacatalogV1TagTemplateField.displayName
arg_name: display-name
help_text: Display name of the tag template field.
- arg_name: type
required: true
help_text: |
Type of the tag template field. Choices are double, string, bool, timestamp, and enum.
To specify a string field:
`type=string`
To specify an enum field with values 'A' and 'B':
`type="enum(A|B)"`
- release_tracks: [ALPHA, BETA]
help_text:
brief: Create a Data Catalog tag template field.
description: Create a Data Catalog tag template field.
examples: |
Create a string tag template field:
$ {command} create FIELD --display-name=DISPLAY --type=string
Create an enum tag template field with values 'A' and 'B':
$ {command} FIELD --display-name=DISPLAY --type="enum(A|B)"
request:
collection: datacatalog.projects.locations.tagTemplates.fields
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tag_templates.util:UpdateCreateTagTemplateFieldRequestWithInput
arguments:
resource:
help_text: Tag template field to create.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template_field
params:
- api_field: googleCloudDatacatalogV1beta1TagTemplateField.displayName
arg_name: display-name
help_text: Display name of the tag template field.
- arg_name: type
required: true
help_text: |
Type of the tag template field. Choices are double, string, bool, timestamp, and enum.
To specify a string field:
`type=string`
To specify an enum field with values 'A' and 'B':
`type="enum(A|B)"`

View File

@@ -0,0 +1,48 @@
- release_tracks: [GA]
help_text:
brief: Delete a Data Catalog tag template field.
description: Delete a Data Catalog tag template field.
examples: |
Delete a tag template field:
$ {command} FIELD
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates.fields
arguments:
resource:
help_text: Tag template field to delete.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template_field
params:
- api_field: force
arg_name: force
help_text: |-
If True, this tag template field will be deleted from any existing tags.
- release_tracks: [ALPHA, BETA]
help_text:
brief: Delete a Data Catalog tag template field.
description: Delete a Data Catalog tag template field.
examples: |
Delete a tag template field:
$ {command} FIELD
request:
collection: datacatalog.projects.locations.tagTemplates.fields
arguments:
resource:
help_text: Tag template field to delete.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template_field
params:
- api_field: force
arg_name: force
help_text: |-
If True, this tag template field will be deleted from any existing tags.

View File

@@ -0,0 +1,31 @@
# -*- 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 tag template enum values 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
)
@base.DefaultUniverseOnly
class TagTemplateFields(base.Group):
"""Manage tag template enum values in Data Catalog."""
pass

View File

@@ -0,0 +1,50 @@
- release_tracks: [GA]
help_text:
brief: Rename an enum value in Data Catalog tag template enum field.
description: Rename an enum value in Data Catalog tag template enum field.
examples: |
Rename an enum value in tag template enum field:
$ {command} ENUM_VALUE --new-id="new-id"
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates.fields.enumValues
method: rename
arguments:
resource:
help_text: Enum value to rename.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:enum_value
params:
- api_field: googleCloudDatacatalogV1RenameTagTemplateFieldEnumValueRequest.newEnumValueDisplayName
arg_name: new-id
required: true
help_text: New display name of the enum value.
- release_tracks: [ALPHA, BETA]
help_text:
brief: Rename an enum value in Data Catalog tag template enum field.
description: Rename an enum value in Data Catalog tag template enum field.
examples: |
Rename an enum value in tag template enum field:
$ {command} ENUM_VALUE --new-id="new-id"
request:
collection: datacatalog.projects.locations.tagTemplates.fields.enumValues
method: rename
arguments:
resource:
help_text: Enum value to rename.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:enum_value
params:
- api_field: googleCloudDatacatalogV1beta1RenameTagTemplateFieldEnumValueRequest.newEnumValueDisplayName
arg_name: new-id
required: true
help_text: New display name of the enum value.

View File

@@ -0,0 +1,50 @@
- release_tracks: [GA]
help_text:
brief: Rename a Data Catalog tag template field.
description: Rename a Data Catalog tag template field.
examples: |
Update the ID of a tag template field:
$ {command} FIELD --new-id="new-id"
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates.fields
method: rename
arguments:
resource:
help_text: Tag template field to rename.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template_field
params:
- api_field: googleCloudDatacatalogV1RenameTagTemplateFieldRequest.newTagTemplateFieldId
arg_name: new-id
required: true
help_text: New ID of the tag template field.
- release_tracks: [ALPHA, BETA]
help_text:
brief: Rename a Data Catalog tag template field.
description: Rename a Data Catalog tag template field.
examples: |
Update the ID of a tag template field:
$ {command} FIELD --new-id="new-id"
request:
collection: datacatalog.projects.locations.tagTemplates.fields
method: rename
arguments:
resource:
help_text: Tag template field to rename.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template_field
params:
- api_field: googleCloudDatacatalogV1beta1RenameTagTemplateFieldRequest.newTagTemplateFieldId
arg_name: new-id
required: true
help_text: New ID of the tag template field.

View File

@@ -0,0 +1,92 @@
- release_tracks: [GA]
help_text:
brief: Update a Data Catalog tag template field.
description: Update a Data Catalog tag template field.
examples: |
Update the display name of a tag template field:
$ {command} FIELD --display-name=NAME
Set tag template enum field values to be 'A' and 'B':
$ {command} FIELD --enum-values=A,B
Set a tag template field to be optional:
$ {command} FIELD --no-required
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates.fields
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tag_templates.util:UpdateUpdateTagTemplateFieldRequestWithInputV1
arguments:
resource:
help_text: Tag template field to update.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template_field
params:
- api_field: googleCloudDatacatalogV1TagTemplateField.displayName
arg_name: display-name
help_text: Display name of the tag template field.
- arg_name: enum-values
type: arg_list
help_text: |
Comma-separated list of enum values. The list of enum values passed with this flag replaces the existing one in tag template enum field. That means:
- the enum values passed to the flag and not present in tag template enum field get created
- the enum values present in tag template enum field and missing in the list get removed
- the order of the items on the list is preserved
Enum values can only be removed from optional enum fields for now.
- api_field: googleCloudDatacatalogV1TagTemplateField.isRequired
arg_name: required
help_text: |
Indicates if the tag template field is required. Updating from FALSE (optional) to TRUE (required) is NOT allowed.
- release_tracks: [ALPHA, BETA]
help_text:
brief: Update a Data Catalog tag template field.
description: Update a Data Catalog tag template field.
examples: |
Update the display name of a tag template field:
$ {command} FIELD --display-name=NAME
Set tag template enum field values to be 'A' and 'B':
$ {command} FIELD --enum-values=A,B
Set a tag template field to be optional:
$ {command} FIELD --no-required
request:
collection: datacatalog.projects.locations.tagTemplates.fields
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tag_templates.util:UpdateUpdateTagTemplateFieldRequestWithInput
arguments:
resource:
help_text: Tag template field to update.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template_field
params:
- api_field: googleCloudDatacatalogV1beta1TagTemplateField.displayName
arg_name: display-name
help_text: Display name of the tag template field.
- arg_name: enum-values
type: arg_list
help_text: |
Comma-separated list of enum values. The list of enum values passed with this flag replaces the existing one in tag template enum field. That means:
- the enum values passed to the flag and not present in tag template enum field get created
- the enum values present in tag template enum field and missing in the list get removed
- the order of the items on the list is preserved
Enum values can only be removed from optional enum fields for now.
- api_field: googleCloudDatacatalogV1beta1TagTemplateField.isRequired
arg_name: required
help_text: |
Indicates if the tag template field is required. Updating from FALSE (optional) to TRUE (required) is NOT allowed.

View File

@@ -0,0 +1,48 @@
- release_tracks: [GA]
help_text:
brief: Get the IAM policy for a Data Catalog tag template.
description: |
*{command}* displays the IAM policy associated with a Data Catalog.
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 a given tag template, run:
$ {command} --location=my-location my-tag-template
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template for which to display the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
- release_tracks: [ALPHA, BETA]
help_text:
brief: Get the IAM policy for a Data Catalog tag template.
description: |
*{command}* displays the IAM policy associated with a Data Catalog.
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 a given tag template, run:
$ {command} --location=my-location my-tag-template
request:
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template for which to display the IAM policy.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template

View File

@@ -0,0 +1,62 @@
- release_tracks: [GA]
help_text:
brief: Remove IAM policy binding from a Data Catalog tag template.
description: |
Removes a policy binding from the IAM policy of a Data Catalog tag
template, given a project ID and the binding.
examples: |
To remove an IAM policy binding for the role of 'roles/editor' for the
user 'test-user@gmail.com' on tag template 'my-tag-template' with location
'my-location', run:
$ {command} --location=my-location my-tag-template --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 tag template 'my-tag-template' with location
'my-location', run:
$ {command} --location=my-location my-tag-template --member='allAuthenticatedUsers' --role='roles/editor'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template to remove the IAM policy binding from.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
- release_tracks: [ALPHA, BETA]
help_text:
brief: Remove IAM policy binding from a Data Catalog tag template.
description: |
Removes a policy binding from the IAM policy of a Data Catalog tag
template, given a project ID and the binding.
examples: |
To remove an IAM policy binding for the role of 'roles/editor' for the
user 'test-user@gmail.com' on tag template 'my-tag-template' with location
'my-location', run:
$ {command} --location=my-location my-tag-template --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 tag template 'my-tag-template' with location
'my-location', run:
$ {command} --location=my-location my-tag-template --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.tagTemplates
arguments:
resource:
help_text: Tag template to remove the IAM policy binding from.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template

View File

@@ -0,0 +1,51 @@
- release_tracks: [GA]
help_text:
brief: Set the IAM policy for a Data Catalog tag template.
description: |
Sets the IAM policy for the given Data Catalog tag template 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 tag template 'my-tag-template' with
location 'my-location':
$ {command} my-tag-template --location=my-location policy.json
See https://cloud.google.com/iam/docs/managing-policies for details of the
policy file format and contents.
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template to set the IAM policy for.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
- release_tracks: [ALPHA, BETA]
help_text:
brief: Set the IAM policy for a Data Catalog tag template.
description: |
Sets the IAM policy for the given Data Catalog tag template 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 tag template 'my-tag-template' with
location 'my-location':
$ {command} my-tag-template --location=my-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.tagTemplates
arguments:
resource:
help_text: Tag template to set the IAM policy for.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template

View File

@@ -0,0 +1,48 @@
- release_tracks: [GA]
help_text:
brief: Update a Data Catalog tag template.
description: Update a Data Catalog tag template.
examples: |
Update the display name of a tag template:
$ {command} TEMPLATE --display-name=DISPLAY
request:
api_version: v1
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template to update.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
params:
- api_field: googleCloudDatacatalogV1TagTemplate.displayName
arg_name: display-name
help_text: New human-readable name for the tag template.
- release_tracks: [ALPHA, BETA]
help_text:
brief: Update a Data Catalog tag template.
description: Update a Data Catalog tag template.
examples: |
Update the display name of a tag template:
$ {command} TEMPLATE --display-name=DISPLAY
request:
collection: datacatalog.projects.locations.tagTemplates
arguments:
resource:
help_text: Tag template to update.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag_template
params:
- api_field: googleCloudDatacatalogV1beta1TagTemplate.displayName
arg_name: display-name
help_text: New human-readable name for the tag template.

View File

@@ -0,0 +1,44 @@
# -*- 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 tags in Data Catalog."""
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 is deprecated. '
'Please use `gcloud dataplex entries` instead. '
'Note that aspects - successors of tags - are part of the entry '
'resource and are managed by `gcloud dataplex entries` command.'
),
error=(
'This command has been removed. '
'Please use `gcloud dataplex entries` instead. '
'Note that aspects - successors of tags - are part of the entry '
'resource and are managed by `gcloud dataplex entries` command.'
),
)
@base.ReleaseTracks(base.ReleaseTrack.BETA, base.ReleaseTrack.ALPHA,
base.ReleaseTrack.GA)
@base.DefaultUniverseOnly
class Tags(base.Group):
"""Manage tags in Data Catalog."""
pass

View File

@@ -0,0 +1,104 @@
- release_tracks: [GA]
help_text:
brief: Create a Data Catalog entry tag.
description: Create a Data Catalog entry tag.
examples: |
Create a Data Catalog entry tag:
$ {command} --entry=ENTRY --tag-template=TAG_TEMPLATE --tag-file=TAG_FILE
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups.entries.tags
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tags.util:UpdateCreateTagRequestWithInputV1
arguments:
additional_arguments_hook: googlecloudsdk.command_lib.data_catalog.tags.flags:AddCreateUpdateTagFlags
resource:
help_text: Entry to attach the tag to. The arguments in this group can be used to specify the attributes of this resource.
is_positional: false
is_parent_resource: true
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:non_primary_entry
params:
- arg_name: tag-file
required: true
help_text: |
Path to a JSON or YAML file containing the tag.
The file should contain a JSON/YAML object with a key and value
for each field that should be set. See $ gcloud topic datetimes
for information on how to specify timestamp fields.
For example:
{
"dbl_field": 123,
"str_field": "String",
"bool_field": true,
"ts_field": "1970-01-01T00:00:00.000Z",
"enum_field": "ENUM_A",
}
- api_field: googleCloudDatacatalogV1Tag.column
arg_name: scope
help_text: |
Scope within the parent resource that the tag is attached to. Scopes
allow users to attach tags to individual columns based on the parent
resource's schema. To attach a tag to a nested column, use '.' to
separate the column names: 'outer_column.inner_column'.
- release_tracks: [ALPHA, BETA]
help_text:
brief: Create a Data Catalog entry tag.
description: Create a Data Catalog entry tag.
examples: |
Create a Data Catalog entry tag:
$ {command} --entry=ENTRY --tag-template=TAG_TEMPLATE --tag-file=TAG_FILE
request:
collection: datacatalog.projects.locations.entryGroups.entries.tags
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tags.util:UpdateCreateTagRequestWithInput
arguments:
additional_arguments_hook: googlecloudsdk.command_lib.data_catalog.tags.flags:AddCreateUpdateTagFlags
resource:
help_text: Entry to attach the tag to. The arguments in this group can be used to specify the attributes of this resource.
is_positional: false
is_parent_resource: true
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:non_primary_entry
params:
- arg_name: tag-file
required: true
help_text: |
Path to a JSON or YAML file containing the tag.
The file should contain a JSON/YAML object with a key and value
for each field that should be set. See $ gcloud topic datetimes
for information on how to specify timestamp fields.
For example:
{
"dbl_field": 123,
"str_field": "String",
"bool_field": true,
"ts_field": "1970-01-01T00:00:00.000Z",
"enum_field": "ENUM_A",
}
- api_field: googleCloudDatacatalogV1beta1Tag.column
arg_name: scope
help_text: |
Scope within the parent resource that the tag is attached to. Scopes
allow users to attach tags to individual columns based on the parent
resource's schema. To attach a tag to a nested column, use '.' to
separate the column names: 'outer_column.inner_column'.

View File

@@ -0,0 +1,38 @@
- release_tracks: [GA]
help_text:
brief: Delete a Data Catalog entry tag.
description: Delete a Data Catalog entry tag.
examples: |
Delete a Data Catalog entry tag:
$ {command} TAG
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups.entries.tags
arguments:
resource:
help_text: Entry tag to delete. The arguments in this group can be used to specify the attributes of this resource.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag
is_positional: true
- release_tracks: [ALPHA, BETA]
help_text:
brief: Delete a Data Catalog entry tag.
description: Delete a Data Catalog entry tag.
examples: |
Delete a Data Catalog entry tag:
$ {command} TAG
request:
collection: datacatalog.projects.locations.entryGroups.entries.tags
arguments:
resource:
help_text: Entry tag to delete. The arguments in this group can be used to specify the attributes of this resource.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag
is_positional: true

View File

@@ -0,0 +1,44 @@
- release_tracks: [GA]
help_text:
brief: List Data Catalog entry tags.
description: List Data Catalog entry tags.
examples: |
List the tags for a Data Catalog entry:
$ {command} --entry=ENTRY
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups.entries.tags
response:
id_field: name
arguments:
resource:
help_text: Data Catalog entry in which to list tags. The arguments in this group can be used to specify the attributes of this resource.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: false
- release_tracks: [ALPHA, BETA]
help_text:
brief: List Data Catalog entry tags.
description: List Data Catalog entry tags.
examples: |
List the tags for a Data Catalog entry:
$ {command} --entry=ENTRY
request:
collection: datacatalog.projects.locations.entryGroups.entries.tags
response:
id_field: name
arguments:
resource:
help_text: Data Catalog entry in which to list tags. The arguments in this group can be used to specify the attributes of this resource.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:entry
is_positional: false

View File

@@ -0,0 +1,88 @@
- release_tracks: [GA]
help_text:
brief: Update a Data Catalog entry tag.
description: |
Update a Data Catalog entry tag. This will overwrite the
current values of the tag.
examples: |
Update a Data Catalog entry tag:
$ {command} TAG --tag-template=TAG_TEMPLATE --tag-file=TAG_FILE
request:
api_version: v1
collection: datacatalog.projects.locations.entryGroups.entries.tags
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tags.util:UpdateUpdateTagRequestWithInputV1
arguments:
additional_arguments_hook: googlecloudsdk.command_lib.data_catalog.tags.flags:AddCreateUpdateTagFlags
resource:
help_text: Entry tag to update. The arguments in this group can be used to specify the attributes of this resource.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag
is_positional: true
params:
- arg_name: tag-file
required: true
help_text: |
Path to a JSON or YAML file containing the tag.
The file should contain a JSON/YAML object with a key and value
for each field that should be set. See $ gcloud topic datetimes
for information on how to specify timestamp fields
For example:
{
"dbl_field": 123,
"str_field": "String",
"bool_field": true,
"ts_field": "1970-01-01T00:00:00.000Z",
"enum_field": "ENUM_A",
}
- release_tracks: [ALPHA, BETA]
help_text:
brief: Update a Data Catalog entry tag.
description: |
Update a Data Catalog entry tag. This will overwrite the
current values of the tag.
examples: |
Update a Data Catalog entry tag:
$ {command} TAG --tag-template=TAG_TEMPLATE --tag-file=TAG_FILE
request:
collection: datacatalog.projects.locations.entryGroups.entries.tags
modify_request_hooks:
- googlecloudsdk.command_lib.data_catalog.tags.util:UpdateUpdateTagRequestWithInput
arguments:
additional_arguments_hook: googlecloudsdk.command_lib.data_catalog.tags.flags:AddCreateUpdateTagFlags
resource:
help_text: Entry tag to update. The arguments in this group can be used to specify the attributes of this resource.
spec: !REF googlecloudsdk.command_lib.data_catalog.resources:tag
is_positional: true
params:
- arg_name: tag-file
required: true
help_text: |
Path to a JSON or YAML file containing the tag.
The file should contain a JSON/YAML object with a key and value
for each field that should be set. See $ gcloud topic datetimes
for information on how to specify timestamp fields
For example:
{
"dbl_field": 123,
"str_field": "String",
"bool_field": true,
"ts_field": "1970-01-01T00:00:00.000Z",
"enum_field": "ENUM_A",
}

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