File: //snap/google-cloud-cli/current/lib/surface/healthcare/fhir_stores/import/gcs.yaml
- release_tracks: [ALPHA, BETA, GA]
help_text:
brief: Import FHIR resources from Google Cloud Storage into a Cloud Healthcare API FHIR store.
description: Import FHIR resources from Google Cloud Storage into a Cloud Healthcare API FHIR store.
examples: |
To import the FHIR resources from the existing bucket 'testGcsBucket' in the folder 'someFolder' into the FHIR store 'test-fhir-store', run:
$ {command} test-fhir-store --gcs-uri=gs://testGcsBucket/someFolder/* --dataset=test-dataset
To perform the same import, but importing resources with the content structure of 'RESOURCE', run:
$ {command} test-fhir-store --gcs-uri=gs://testGcsBucket/someFolder/* --dataset=test-dataset --content-structure=RESOURCE
request:
collection: healthcare.projects.locations.datasets.fhirStores
method: import
ALPHA:
api_version: v1alpha2
BETA:
api_version: v1beta1
GA:
api_version: v1
arguments:
resource:
help_text: Cloud Healthcare API FHIR store into which the data is imported.
spec: !REF googlecloudsdk.command_lib.healthcare.resources:fhir_store
params:
- arg_name: gcs-uri
api_field: importResourcesRequest.gcsSource.uri
required: true
help_text: |-
Cloud Storage source data locations. Each Cloud Storage object
should be a text file that contains newline-delimited JSON structures conforming
to the FHIR standard. You can use wildcards to import multiple files from one or more
directories.
- Use * to match 0 or more non-separator characters. For example,
gs://BUCKET/DIRECTORY/Example```*```.ndjson matches Example.ndjson and Example22.ndjson in
DIRECTORY.
- Use ** to match 0 or more characters (including separators). Must be used at the
end of a path and with no other wildcards in the path. Can also be used with a filename
extension (such as .ndjson), which imports all files with the filename extension in the
specified directory and its subdirectories. For example, gs://BUCKET/DIRECTORY/**.ndjson
imports all files with the .ndjson filename extension in DIRECTORY and its subdirectories.
- Use ? to match 1 character. For example, gs://BUCKET/DIRECTORY/Example?.ndjson matches
Example1.ndjson but does not match Example.ndjson or Example01.ndjson.
- arg_name: content-structure
api_field: importResourcesRequest.contentStructure
choices:
- arg_value: bundle
enum_value: BUNDLE
help_text: |
Each unit is a bundle, which contains one or more resources.
- arg_value: resource
enum_value: RESOURCE
help_text: |
Each unit is a single resource.
- arg_value: bundle-pretty
enum_value: BUNDLE_PRETTY
help_text: |
The entire file is one JSON bundle. The JSON can span multiple lines.
- arg_value: resource-pretty
enum_value: RESOURCE_PRETTY
help_text: |
The entire file is one JSON resource. The JSON can span multiple lines.
help_text: |
Content structure in the source location. The default is BUNDLE.
- arg_name: error-gcs-uri
# This argument is deprecated in BETA.
release_tracks: [ALPHA]
api_field: importResourcesRequest.gcsErrorDestination.uriPrefix
help_text: |
The Cloud Storage bucket/folder path to write files that contain
error details.
async:
collection: healthcare.projects.locations.datasets.operations