feat: Add new gcloud commands, API clients, and third-party libraries across various services.

This commit is contained in:
2026-01-01 20:26:35 +01:00
parent 5e23cbece0
commit a19e592eb7
25221 changed files with 8324611 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*- #
# Copyright 2017 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.
"""Datasets command group for the Cloud Healthcare CLI."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA,
base.ReleaseTrack.GA)
class Datasets(base.Group):
"""Manage Cloud Healthcare API datasets."""

View File

@@ -0,0 +1,31 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Add an IAM policy binding to a Cloud Healthcare API dataset.
description: |
Add an IAM policy binding to a Cloud Healthcare API dataset.
examples: |
To add an IAM policy binding for the role of 'roles/editor' for the user 'test-user@gmail.com'
on the dataset 'test-dataset', run:
$ {command} test-dataset --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: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API dataset to add an IAM policy binding to.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset
iam:
enable_condition: true

View File

@@ -0,0 +1,44 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Create a Cloud Healthcare API dataset.
description: |
Create a new Cloud Healthcare API dataset
examples: |
To create a dataset called 'test-dataset' in us-central1, run:
$ {command} test-dataset
To create a dataset in a different region (ex: asia-northeast1), run:
$ {command} test-dataset --location=asia-northeast1
request:
collection: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API dataset to create.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset
params:
- arg_name: time-zone
api_field: dataset.timeZone
help_text: |
Default timezone used by this dataset.
- arg_name: encryption-key
api_field: dataset.encryptionSpec.kmsKeyName
help_text: |
KMS encryption key that is used to secure this dataset and its sub-resources.
The key used for encryption and the dataset must be in the same location.
If empty, the default Google encryption key will be used to secure this dataset.
The format is projects/{projectId}/locations/{locationId}/keyRings/{keyRingId}/cryptoKeys/{keyId}.
async:
collection: healthcare.projects.locations.datasets.operations

View File

@@ -0,0 +1,64 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: |
Create a new Cloud Healthcare API dataset containing de-identified data from the source dataset.
description: |
Create a new Cloud Healthcare API dataset containing de-identified data from the source dataset.
examples: |
To generate a de-identified version of the dataset 'test-dataset', run the command below. To skip the FHIR stores, omit the --default-fhir-config flag, and to skip DICOM stores, omit the --dicom-filter-tags flag.
$ {command} test-dataset --destination-dataset=projects/{projectId}/locations/us-central1/datasets/test-deid-dataset --default-fhir-config --dicom-filter-tags=MediaStorageSOPClassUID,SeriesInstanceUID,StudyInstanceUID
request:
collection: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
method: deidentify
arguments:
resource:
help_text: Source Cloud Healthcare API dataset to deidentify.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset
params:
- arg_name: destination-dataset
api_field: deidentifyDatasetRequest.destinationDataset
required: true
help_text: |
The name of the dataset resource to which the redacted data should be written
(e.g., projects/{projectId}/locations/{locationId}/datasets/{datasetId}).
The new dataset must not exist, or the request will fail.
- arg_name: dicom-filter-tags
api_field: deidentifyDatasetRequest.config.dicom.keepList.tags
help_text: |
Tags to be filtered. Tags must be DICOM Data Elements, File Meta Elements, or
Directory Structuring Elements, as defined at:
http://dicom.nema.org/medical/dicom/current/output/html/part06.html#table_6-1,.
They may be provided by "Keyword" or "Tag". For example "PatientID", "0010,0010".
- arg_name: text-redaction-mode
api_field: deidentifyDatasetRequest.config.image.textRedactionMode
choices:
- arg_value: all
enum_value: REDACT_ALL_TEXT
help_text: |
Redact all text.
help_text: |
Determines how to redact text from image.
- arg_name: default-fhir-config
type: bool
ALPHA:
processor: googlecloudsdk.command_lib.healthcare.util:InsertEmptyFhirConfig:api_version=v1alpha2
BETA:
processor: googlecloudsdk.command_lib.healthcare.util:InsertEmptyFhirConfig:api_version=v1beta1
GA:
processor: googlecloudsdk.command_lib.healthcare.util:InsertEmptyFhirConfig:api_version=v1
api_field: deidentifyDatasetRequest.config.fhir
help_text: |
Deidentify FHIR data with default configurations.
async:
collection: healthcare.projects.locations.datasets.operations

View File

@@ -0,0 +1,23 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Delete a Cloud Healthcare API dataset.
description: Deletes a Cloud Healthcare API dataset.
examples: |
To delete the dataset 'test-dataset', run:
$ {command} test-dataset
request:
collection: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API dataset to delete.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset

View File

@@ -0,0 +1,23 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Describe a Cloud Healthcare API dataset.
description: Describe a Cloud Healthcare API dataset.
examples: |
To describe the dataset 'test-dataset', run:
$ {command} test-dataset
request:
collection: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API dataset to describe.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset

View File

@@ -0,0 +1,23 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Retrieve the IAM policy for a Cloud Healthcare API dataset.
description: Retrieve the IAM policy for a Cloud Healthcare API dataset.
examples: |
To print the IAM policy for the dataset 'test-dataset', run:
$ {command} test-dataset
request:
collection: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API dataset whose IAM policy to fetch.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset

View File

@@ -0,0 +1,38 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: List Cloud Healthcare API datasets.
description: List Cloud Healthcare API datasets.
examples: |
To list the datasets in us-central1, run:
$ {command}
To list the datasets in europe-west2, run:
$ {command} --location=europe-west2
request:
collection: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
response:
id_field: name
arguments:
resource:
help_text: Parent Cloud Healthcare API location to list all contained Cloud Healthcare API datasets.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:location
output:
format: |
table(
name.scope("datasets"):label=ID,
name.scope("locations").segment(0):label=LOCATION,
timeZone:label=TIMEZONE,
encryptionSpec.kmsKeyName.yesno(yes='Customer-managed key', no='Google-managed key'):label=ENCRYPTION
)

View File

@@ -0,0 +1,31 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Remove an IAM policy binding to a Cloud Healthcare API dataset.
description: |
Remove an IAM policy binding to a Cloud Healthcare API dataset.
examples: |
To remove an IAM policy binding for the role of 'roles/editor' for the user
'test-user@gmail.com' on the dataset 'test-dataset', run:
$ {command} test-dataset --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: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API dataset to remove an IAM policy binding from.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset
iam:
enable_condition: true

View File

@@ -0,0 +1,27 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Set the IAM policy for a Cloud Healthcare API dataset.
description: Set the IAM policy for a Cloud Healthcare API dataset.
examples: |
The following command will read am IAM policy defined in a JSON file
'policy.json' and set it for the dataset 'my-dataset':
$ {command} my-dataset policy.json
See https://cloud.google.com/iam/docs/managing-policies for details of the
policy file format and contents.
request:
collection: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API dataset whose IAM policy to set.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset

View File

@@ -0,0 +1,29 @@
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Update a Cloud Healthcare API dataset.
description: Update a Cloud Healthcare API dataset.
examples: |
To update the dataset 'test-dataset', run:
$ {command} test-dataset --time-zone=PDT
request:
collection: healthcare.projects.locations.datasets
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API dataset you want to update.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:dataset
params:
- arg_name: time-zone
api_field: dataset.timeZone
help_text: |
Default timezone used by this dataset.