与 AWS SDK或DeleteFHIRDatastore一起使用 CLI - AWS SDK 代码示例

AWS 文档 AWS SDK示例 GitHub 存储库中还有更多SDK示例

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

与 AWS SDK或DeleteFHIRDatastore一起使用 CLI

以下代码示例演示如何使用 DeleteFHIRDatastore

CLI
AWS CLI

删除FHIR数据存储

以下delete-fhir-datastore示例演示如何删除 Amazon 中的数据存储及其所有内容 HealthLake。

aws healthlake delete-fhir-datastore \ --datastore-id (Data Store ID) \ --region us-east-1

输出:

{ "DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/(Datastore ID)/r4/", "DatastoreArn": "arn:aws:healthlake:us-east-1:(AWS Account ID):datastore/(Datastore ID)", "DatastoreStatus": "DELETING", "DatastoreId": "(Datastore ID)" }

有关更多信息,请参阅亚马逊开发者指南中的创建和监控FHIR数据存储 < https://docs.aws.amazon.com/healthlake/ latest/devguide/working-with-h FHIR ealthlake.html>。 HealthLake

  • 有关API详细信息,请参阅eleteFHIRDatastore《AWS CLI 命令参考》中的 D

Python
SDK适用于 Python (Boto3)
@classmethod def from_client(cls) -> "HealthLakeWrapper": """ Creates a HealthLakeWrapper instance with a default AWS HealthLake client. :return: An instance of HealthLakeWrapper initialized with the default HealthLake client. """ health_lake_client = boto3.client("healthlake") return cls(health_lake_client) def delete_fhir_datastore(self, datastore_id: str) -> None: """ Deletes a HealthLake data store. :param datastore_id: The data store ID. """ try: self.health_lake_client.delete_fhir_datastore(DatastoreId=datastore_id) except ClientError as err: logger.exception( "Couldn't delete data store with ID %s. Here's why %s", datastore_id, err.response["Error"]["Message"], ) raise
  • 有关API详细信息,请参阅 Python (Boto3) API 参考eleteFHIRDatastore中的 AWS SDKD

注意

还有更多相关信息 GitHub。查找完整示例,学习如何在 AWS 代码示例存储库中进行设置和运行。