文件 AWS SDK AWS 範例 SDK 儲存庫中有更多可用的
本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
ListFHIRDatastores
搭配 a AWS SDK 或 CLI 使用
下列程式碼範例示範如何使用 ListFHIRDatastores
。
- CLI
-
- AWS CLI
-
列出 FHIR Data Stores
下列
list-fhir-datastores
範例顯示如何使用 命令,以及使用者可以如何根據 Amazon HealthLake 中的資料存放區狀態篩選結果。aws healthlake list-fhir-datastores \ --region
us-east-1
\ --filterDatastoreStatus=ACTIVE
輸出:
{ "DatastorePropertiesList": [ { "PreloadDataConfig": { "PreloadDataType": "SYNTHEA" }, "DatastoreName": "FhirTestDatastore", "DatastoreArn": "arn:aws:healthlake:us-east-1:<AWS Account ID>:datastore/<Datastore ID>", "DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/<Datastore ID>/r4/", "DatastoreStatus": "ACTIVE", "DatastoreTypeVersion": "R4", "CreatedAt": 1605574003.209, "DatastoreId": "<Datastore ID>" }, { "DatastoreName": "Demo", "DatastoreArn": "arn:aws:healthlake:us-east-1:<AWS Account ID>:datastore/<Datastore ID>", "DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/<Datastore ID>/r4/", "DatastoreStatus": "ACTIVE", "DatastoreTypeVersion": "R4", "CreatedAt": 1603761064.881, "DatastoreId": "<Datastore ID>" } ] }
如需詳細資訊,請參閱 Amazon HealthLake 開發人員指南中的建立和監控 FHIR Data Store。
-
如需 API 詳細資訊,請參閱 AWS CLI 命令參考中的 ListFHIRDatastores
。
-
- Python
-
- SDK for Python (Boto3)
-
注意
還有更多 on GitHub。尋找完整範例,並了解如何在 AWS 程式碼範例儲存庫
中設定和執行。 @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 list_fhir_datastores(self) -> list[dict[str, any]]: """ Lists all HealthLake datastores. :return: A list of datastore descriptions. """ try: next_token = None datastores = [] # Loop through paginated results. while True: parameters = {} if next_token is not None: parameters["NextToken"] = next_token response = self.health_lake_client.list_fhir_datastores(**parameters) datastores.extend(response["DatastorePropertiesList"]) if "NextToken" in response: next_token = response["NextToken"] else: break return datastores except ClientError as err: logger.exception( "Couldn't list datastores. Here's why %s", err.response["Error"]["Message"] ) raise
-
如需 API 詳細資訊,請參閱 Word for Python (Boto3) Word 參考istFHIRDatastores中的 LWord。 AWS SDK API
-
ListFHIRDatastoreImportJobs
ListFHIRExportJobs