DeleteFHIRDatastore与 AWS SDK 或 CLI 配合使用 - AWS SDK 代码示例

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

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

DeleteFHIRDatastore与 AWS SDK 或 CLI 配合使用

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

CLI
AWS CLI

删除 FHIR 数据存储

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

aws healthlake delete-fhir-datastore \ --datastore-id (Data store ID)

输出:

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

有关更多信息,请参阅《开发人员指南》中的创建和监控 FHIR 数据存储 < https://docs.aws.amazon.com/healthlake/ latest/devguide/working-with-with-fhir-HealthLake.html>。AWS HealthLake

  • 有关 API 的详细信息,请参阅FHIRDatastore《AWS CLI 命令参考》中的 “删除”

Python
适用于 Python 的 SDK(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 FHIRDatastore 版AWS SDK 中删除 (Boto3) API 参考

注意

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

SAP ABAP
适用于 SAP ABAP 的 SDK
注意

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

TRY. " iv_datastore_id = 'a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6' oo_result = lo_hll->deletefhirdatastore( iv_datastoreid = iv_datastore_id ). MESSAGE 'Data store deleted successfully.' TYPE 'I'. CATCH /aws1/cx_hllaccessdeniedex INTO DATA(lo_access_ex). DATA(lv_error) = |Access denied: { lo_access_ex->av_err_code }-{ lo_access_ex->av_err_msg }|. MESSAGE lv_error TYPE 'I'. RAISE EXCEPTION lo_access_ex. CATCH /aws1/cx_hllconflictexception INTO DATA(lo_conflict_ex). lv_error = |Conflict error: { lo_conflict_ex->av_err_code }-{ lo_conflict_ex->av_err_msg }|. MESSAGE lv_error TYPE 'I'. RAISE EXCEPTION lo_conflict_ex. CATCH /aws1/cx_hllresourcenotfoundex INTO DATA(lo_notfound_ex). lv_error = |Resource not found: { lo_notfound_ex->av_err_code }-{ lo_notfound_ex->av_err_msg }|. MESSAGE lv_error TYPE 'I'. RAISE EXCEPTION lo_notfound_ex. ENDTRY.
  • 有关 API 的详细信息,请参阅在 SAP 的 AWS SDK FHIRDatastore 中删除 ABAP API 参考