

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

# 使用管理数据存储 AWS HealthLake
<a name="managing-data-stores"></a>

使用 AWS HealthLake，您可以创建和管理 FHIR R4 资源的数据存储。[创建 HealthLake 数据存储时，FHIR 数据存储库可通过 API 端点使用。 RESTful ](reference-healthlake-endpoints-quotas.md#reference-healthlake-endpoints)在创建 Synthea 开源 FHIR R4 健康数据时，你可以选择将其导入（预加载）到数据存储中。有关更多信息，请参阅 [预加载的数据类型](reference-healthlake-preloaded-data-types.md)。

**重要提示**  
HealthLake 支持两种类型的 FHIR 数据存储授权策略，即 AWS Sigv4 或 FHIR 上的 SMART。在创建 HealthLake FHIR 数据存储之前，必须选择一种授权策略。有关更多信息，请参阅 [数据存储授权策略](getting-started-concepts.md#concept-data-store-authorization-strategy)。

要查找活动 HealthLake 数据存储的 FHIR 相关能力（行为），请检索其[能力](reference-fhir-capability-statement.md)声明。

以下主题介绍如何使用、和使用 HealthLake 云原生操作创建、描述、列出、标记和删除 FHIR 数据存储。 AWS CLI AWS SDKs AWS 管理控制台

**Topics**
+ [创建数据存储](managing-data-stores-create.md)
+ [获取数据存储属性](managing-data-stores-describe.md)
+ [列出数据存储](managing-data-stores-list.md)
+ [标记数据存储](managing-data-stores-tagging.md)
+ [删除数据存储](managing-data-stores-delete.md)

# 创建 HealthLake 数据存储
<a name="managing-data-stores-create"></a>

`CreateFHIRDatastore`用于创建符合 FHIR R4 规范 AWS HealthLake 的数据存储。 HealthLake 数据存储用于导入、管理、搜索和导出 FHIR 数据。在创建 Synthea 开源 FHIR R4 健康数据时，你可以选择将其导入（预加载）到数据存储中。有关更多信息，请参阅 [预加载的数据类型](reference-healthlake-preloaded-data-types.md)。

**重要提示**  
HealthLake 支持两种类型的 FHIR 数据存储授权策略，即 AWS Sigv4 或 FHIR 上的 SMART。在创建 HealthLake FHIR 数据存储之前，必须选择一种授权策略。有关更多信息，请参阅 [数据存储授权策略](getting-started-concepts.md#concept-data-store-authorization-strategy)。

创建 HealthLake 数据存储时，FHIR 数据存储库可通过 RESTful API [端点](reference-healthlake-endpoints-quotas.md#reference-healthlake-endpoints)使用。创建 HealthLake 数据存储后，您可以请求其[能力声明](reference-fhir-capability-statement.md)来查找所有关联的 FHIR 相关能力（行为）。

以下菜单提供了 AWS CLI 和的示例， AWS SDKs 并提供了操作步骤 AWS 管理控制台。有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_CreateFHIRDatastore.html](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_CreateFHIRDatastore.html)。

**创建 HealthLake 数据存储**  
根据您的访问偏好选择菜单 AWS HealthLake。

## AWS CLI 和 SDKs
<a name="managing-data-stores-create-cli-sdk"></a>

------
#### [ CLI ]

**AWS CLI**  
**示例 1：创建支持 Sigv4 的数据存储 HealthLake **  
以下`create-fhir-datastore`示例演示了如何在中创建新的数据存储 AWS HealthLake。  

```
aws healthlake create-fhir-datastore \
    --datastore-type-version R4 \
    --datastore-name "FhirTestDatastore"
```
输出：  

```
{
    "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": "CREATING",
    "DatastoreId": "(Data store ID)"
}
```
**示例 2：在支持 FHIR 的数据存储上创建 SM HealthLake ART**  
以下`create-fhir-datastore`示例演示了如何在中启用 FHIR 的数据存储上创建新的 SMART。 AWS HealthLake  

```
aws healthlake create-fhir-datastore \
    --datastore-name "your-data-store-name" \
    --datastore-type-version R4 \
    --preload-data-config PreloadDataType="SYNTHEA" \
    --sse-configuration '{ "KmsEncryptionConfig": {  "CmkType": "CUSTOMER_MANAGED_KMS_KEY", "KmsKeyId": "arn:aws:kms:us-east-1:your-account-id:key/your-key-id" } }' \
    --identity-provider-configuration  file://identity_provider_configuration.json
```
`identity_provider_configuration.json` 的内容：  

```
{
    "AuthorizationStrategy": "SMART_ON_FHIR_V1",
    "FineGrainedAuthorizationEnabled": true,
    "IdpLambdaArn": "arn:aws:lambda:your-region:your-account-id:function:your-lambda-name",
    "Metadata": "{\"issuer\":\"https://ehr.example.com\", \"jwks_uri\":\"https://ehr.example.com/.well-known/jwks.json\",\"authorization_endpoint\":\"https://ehr.example.com/auth/authorize\",\"token_endpoint\":\"https://ehr.token.com/auth/token\",\"token_endpoint_auth_methods_supported\":[\"client_secret_basic\",\"foo\"],\"grant_types_supported\":[\"client_credential\",\"foo\"],\"registration_endpoint\":\"https://ehr.example.com/auth/register\",\"scopes_supported\":[\"openId\",\"profile\",\"launch\"],\"response_types_supported\":[\"code\"],\"management_endpoint\":\"https://ehr.example.com/user/manage\",\"introspection_endpoint\":\"https://ehr.example.com/user/introspect\",\"revocation_endpoint\":\"https://ehr.example.com/user/revoke\",\"code_challenge_methods_supported\":[\"S256\"],\"capabilities\":[\"launch-ehr\",\"sso-openid-connect\",\"client-public\"]}"
}
```
输出：  

```
{
    "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": "CREATING",
    "DatastoreId": "(Data store ID)"
}
```
有关更多信息，请参阅《*AWS HealthLake 开发人员指南》*中的[创建和监控 FHIR 数据存储](https://docs.aws.amazon.com/healthlake/latest/devguide/working-with-FHIR-healthlake.html)。  
+  有关 API 的详细信息，请参阅FHIRDatastore《*AWS CLI 命令参考*》中的 “[创建](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/healthlake/create-fhir-datastore.html)”。

------
#### [ 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 create_fhir_datastore(
        self,
        datastore_name: str,
        sse_configuration: dict[str, any] = None,
        identity_provider_configuration: dict[str, any] = None,
    ) -> dict[str, str]:
        """
        Creates a new HealthLake data store.
        When creating a SMART on FHIR data store, the following parameters are required:
        - sse_configuration: The server-side encryption configuration for a SMART on FHIR-enabled data store.
        - identity_provider_configuration: The identity provider configuration for a SMART on FHIR-enabled data store.

        :param datastore_name: The name of the data store.
        :param sse_configuration: The server-side encryption configuration for a SMART on FHIR-enabled data store.
        :param identity_provider_configuration: The identity provider configuration for a SMART on FHIR-enabled data store.
        :return: A dictionary containing the data store information.
        """
        try:
            parameters = {"DatastoreName": datastore_name, "DatastoreTypeVersion": "R4"}
            if (
                sse_configuration is not None
                and identity_provider_configuration is not None
            ):
                # Creating a SMART on FHIR-enabled data store
                parameters["SseConfiguration"] = sse_configuration
                parameters[
                    "IdentityProviderConfiguration"
                ] = identity_provider_configuration

            response = self.health_lake_client.create_fhir_datastore(**parameters)
            return response
        except ClientError as err:
            logger.exception(
                "Couldn't create data store %s. Here's why %s",
                datastore_name,
                err.response["Error"]["Message"],
            )
            raise
```
以下代码显示了启用 FH HealthLake IR 的数据存储上的 SMART 参数示例。  

```
            sse_configuration = {
                "KmsEncryptionConfig": {"CmkType": "AWS_OWNED_KMS_KEY"}
            }
            # TODO: Update the metadata to match your environment.
            metadata = {
                "issuer": "https://ehr.example.com",
                "jwks_uri": "https://ehr.example.com/.well-known/jwks.json",
                "authorization_endpoint": "https://ehr.example.com/auth/authorize",
                "token_endpoint": "https://ehr.token.com/auth/token",
                "token_endpoint_auth_methods_supported": [
                    "client_secret_basic",
                    "foo",
                ],
                "grant_types_supported": ["client_credential", "foo"],
                "registration_endpoint": "https://ehr.example.com/auth/register",
                "scopes_supported": ["openId", "profile", "launch"],
                "response_types_supported": ["code"],
                "management_endpoint": "https://ehr.example.com/user/manage",
                "introspection_endpoint": "https://ehr.example.com/user/introspect",
                "revocation_endpoint": "https://ehr.example.com/user/revoke",
                "code_challenge_methods_supported": ["S256"],
                "capabilities": [
                    "launch-ehr",
                    "sso-openid-connect",
                    "client-public",
                ],
            }
            # TODO: Update the IdpLambdaArn.
            identity_provider_configuration = {
                "AuthorizationStrategy": "SMART_ON_FHIR_V1",
                "FineGrainedAuthorizationEnabled": True,
                "IdpLambdaArn": "arn:aws:lambda:your-region:your-account-id:function:your-lambda-name",
                "Metadata": json.dumps(metadata),
            }
            data_store = self.create_fhir_datastore(
                datastore_name, sse_configuration, identity_provider_configuration
            )
```
+  有关 API 的详细信息，请参阅在 *Python AWS 开发工具包FHIRDatastore中[创建](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/CreateFHIRDatastore) (Boto3) API 参考*。
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)中查找完整示例，了解如何进行设置和运行。

------
#### [ SAP ABAP ]

**适用于 SAP ABAP 的 SDK**  
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/hll#code-examples)中查找完整示例，了解如何进行设置和运行。

```
    TRY.
        " iv_datastore_name = 'MyHealthLakeDataStore'
        oo_result = lo_hll->createfhirdatastore(
          iv_datastorename = iv_datastore_name
          iv_datastoretypeversion = 'R4'
        ).
        MESSAGE 'Data store created successfully.' TYPE 'I'.
      CATCH /aws1/cx_hllvalidationex INTO DATA(lo_validation_ex).
        DATA(lv_error) = |Validation error: { lo_validation_ex->av_err_code }-{ lo_validation_ex->av_err_msg }|.
        MESSAGE lv_error TYPE 'I'.
        RAISE EXCEPTION lo_validation_ex.
      CATCH /aws1/cx_hllinternalserverex INTO DATA(lo_internal_ex).
        lv_error = |Internal server error: { lo_internal_ex->av_err_code }-{ lo_internal_ex->av_err_msg }|.
        MESSAGE lv_error TYPE 'I'.
        RAISE EXCEPTION lo_internal_ex.
      CATCH /aws1/cx_hllthrottlingex INTO DATA(lo_throttling_ex).
        lv_error = |Throttling error: { lo_throttling_ex->av_err_code }-{ lo_throttling_ex->av_err_msg }|.
        MESSAGE lv_error TYPE 'I'.
        RAISE EXCEPTION lo_throttling_ex.
    ENDTRY.
```
+  有关 API 的详细信息，请参阅在 SAP 的 *AWS SDK FHIRDatastore 中[创建](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) ABAP API 参考*。

------

**示例可用性**  
找不到所需的内容？ 使用本页右侧边栏上的 “**提供反馈**” 链接请求代码示例。

## AWS 控制台
<a name="managing-data-stores-create-console"></a>

**备注**  
以下过程创建具有 [AWS Sigv4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) 授权 HealthLake 的数据存储。 HealthLake 控制台不支持在 FHIR 上创建 SMART 数据存储。

**使用 AWS Sigv4 授权创建 HealthLake 数据存储**

1. 登录 HealthLake 控制台上的 “[创建数据存储](https://console.aws.amazon.com/healthlake/home#/create-datastore)” 页面。

1. 选择 “**创建数据存储**”。

1. 在**数据存储设置**部分中，为**数据存储名称**指定一个名称。

1. （可选）在**数据存储设置**部分中，对于**预加载样本数据**，选中预加载合成数据的复选框。Synthea 数据是一个开源示例数据集。有关更多信息，请参阅 [合成预加载的数据类型 HealthLake](reference-healthlake-preloaded-data-types.md)。

1. 在**数据存储加密**部分，选择**使用 AWS 拥有的密钥（默认）**或**选择其他 AWS KMS 密钥（高级）**。

1. 在 “**标签-*可选***” 部分中，您可以向数据存储中添加标签。要了解有关为数据存储添加标签的更多信息，请参阅[标记 HealthLake 数据存储](managing-data-stores-tagging.md)。

1. 选择 “**创建数据存储**”。

   数据存储的状态可在**数据存储**页面上找到。

# 获取 HealthLake 数据存储属性
<a name="managing-data-stores-describe"></a>

`DescribeFHIRDatastore`用于获取 AWS HealthLake 数据存储的属性。以下菜单提供了操作步骤 AWS 管理控制台 和 AWS CLI 和的代码示例 AWS SDKs。有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_DescribeFHIRDatastore.html](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_DescribeFHIRDatastore.html)。

**获取 HealthLake 数据存储的属性**  
根据您的访问偏好选择菜单 AWS HealthLake。

## AWS CLI 和 SDKs
<a name="managing-data-stores-describe-cli-sdk"></a>

------
#### [ CLI ]

**AWS CLI**  
**描述 FHIR 数据存储**  
以下`describe-fhir-datastore`示例演示了如何在中查找数据存储的属性 AWS HealthLake。  

```
aws healthlake describe-fhir-datastore \
    --datastore-id "1f2f459836ac6c513ce899f9e4f66a59"
```
输出：  

```
{
    "DatastoreProperties": {
        "PreloadDataConfig": {
            "PreloadDataType": "SYNTHEA"
        },
        "SseConfiguration": {
            "KmsEncryptionConfig": {
                "CmkType": "CUSTOMER_MANAGED_KMS_KEY",
                "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
            }
        },
        "DatastoreName": "Demo",
        "DatastoreArn": "arn:aws:healthlake:us-east-1:<AWS Account ID>:datastore/<Data store ID>",
        "DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/<Data store ID>/r4/",
        "DatastoreStatus": "ACTIVE",
        "DatastoreTypeVersion": "R4",
        "CreatedAt": 1603761064.881,
        "DatastoreId": "<Data store ID>",
        "IdentityProviderConfiguration": {
            "AuthorizationStrategy": "AWS_AUTH",
            "FineGrainedAuthorizationEnabled": false
        }
    }
}
```
有关更多信息，请参阅《*AWS HealthLake 开发人员指南》*中的[创建和监控 FHIR 数据存储](https://docs.aws.amazon.com/healthlake/latest/devguide/working-with-FHIR-healthlake.html)。  
+  有关 API 的详细信息，请参阅FHIRDatastore《*AWS CLI 命令参考*》中的 “[描述](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/healthlake/describe-fhir-datastore.html)”。

------
#### [ 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 describe_fhir_datastore(self, datastore_id: str) -> dict[str, any]:
        """
        Describes a HealthLake data store.
        :param datastore_id: The data store ID.
        :return: The data store description.
        """
        try:
            response = self.health_lake_client.describe_fhir_datastore(
                DatastoreId=datastore_id
            )
            return response["DatastoreProperties"]
        except ClientError as err:
            logger.exception(
                "Couldn't describe data store with ID %s. Here's why %s",
                datastore_id,
                err.response["Error"]["Message"],
            )
            raise
```
+  有关 API 的详细信息，请参阅适用于 *Python 的AWS SDK (Boto3)* API 参考FHIRDatastore中的[描述](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/DescribeFHIRDatastore)。
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)中查找完整示例，了解如何进行设置和运行。

------
#### [ SAP ABAP ]

**适用于 SAP ABAP 的 SDK**  
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/hll#code-examples)中查找完整示例，了解如何进行设置和运行。

```
    TRY.
        " iv_datastore_id = 'a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6'
        oo_result = lo_hll->describefhirdatastore(
          iv_datastoreid = iv_datastore_id
        ).
        DATA(lo_datastore_properties) = oo_result->get_datastoreproperties( ).
        IF lo_datastore_properties IS BOUND.
          DATA(lv_datastore_name) = lo_datastore_properties->get_datastorename( ).
          DATA(lv_datastore_status) = lo_datastore_properties->get_datastorestatus( ).
          MESSAGE 'Data store described successfully.' TYPE 'I'.
        ENDIF.
      CATCH /aws1/cx_hllresourcenotfoundex INTO DATA(lo_notfound_ex).
        DATA(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.
      CATCH /aws1/cx_hllvalidationex INTO DATA(lo_validation_ex).
        lv_error = |Validation error: { lo_validation_ex->av_err_code }-{ lo_validation_ex->av_err_msg }|.
        MESSAGE lv_error TYPE 'I'.
        RAISE EXCEPTION lo_validation_ex.
    ENDTRY.
```
+  有关 API 的详细信息，请参阅适用于 SAP 的 *AWS SDK ABAP API 参考FHIRDatastore*中的[描述](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html)。

------

**示例可用性**  
找不到所需的内容？ 使用本页右侧边栏上的 “**提供反馈**” 链接请求代码示例。

## AWS 控制台
<a name="managing-data-stores-describe-console"></a>

1. 登录 HealthLake 控制台上的[数据存储](https://console.aws.amazon.com/healthlake/home#/list-datastores)页面。

1. 选择数据存储。

   **数据存储详细信息**页面打开，所有 HealthLake 数据存储属性均可用。

# 列出 HealthLake 数据存储
<a name="managing-data-stores-list"></a>

`ListFHIRDatastores`用于列出用户账户中的所有 HealthLake 数据存储，无论数据存储状态如何。以下菜单提供了操作步骤 AWS 管理控制台 和 AWS CLI 和的代码示例 AWS SDKs。有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_ListFHIRDatastores.html](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_ListFHIRDatastores.html)。

**列出所有 HealthLake 数据存储**  
根据您的访问偏好选择菜单 AWS HealthLake。

## AWS CLI 和 SDKs
<a name="managing-data-stores-list-cli-sdk"></a>

------
#### [ CLI ]

**AWS CLI**  
**列出 FHIR 数据存储**  
以下`list-fhir-datastores`示例说明如何使用该命令以及用户如何根据中的数据存储状态筛选结果 AWS HealthLake。  

```
aws healthlake list-fhir-datastores \
    --filter DatastoreStatus=ACTIVE
```
输出：  

```
{
    "DatastorePropertiesList": [
    {
        "PreloadDataConfig": {
            "PreloadDataType": "SYNTHEA"
        },
        "SseConfiguration": {
            "KmsEncryptionConfig": {
                "CmkType": "CUSTOMER_MANAGED_KMS_KEY",
                "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
            }
        },
        "DatastoreName": "Demo",
        "DatastoreArn": "arn:aws:healthlake:us-east-1:<AWS Account ID>:datastore/<Data store ID>",
        "DatastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/<Data store ID>/r4/",
        "DatastoreStatus": "ACTIVE",
        "DatastoreTypeVersion": "R4",
        "CreatedAt": 1603761064.881,
        "DatastoreId": "<Data store ID>",
        "IdentityProviderConfiguration": {
            "AuthorizationStrategy": "AWS_AUTH",
            "FineGrainedAuthorizationEnabled": false
        }
    }
    ]
}
```
有关更多信息，请参阅《*AWS HealthLake 开发人员指南》*中的[创建和监控 FHIR 数据存储](https://docs.aws.amazon.com/healthlake/latest/devguide/working-with-FHIR-healthlake.html)。  
+  有关 API 的详细信息，请参阅FHIRDatastores《*AWS CLI 命令参考*》中的 “[列表](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/healthlake/list-fhir-datastores.html)”。

------
#### [ 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 list_fhir_datastores(self) -> list[dict[str, any]]:
        """
        Lists all HealthLake data stores.
        :return: A list of data store 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 data stores. Here's why %s", err.response["Error"]["Message"]
            )
            raise
```
+  有关 API 的详细信息，请参阅《适用于 *Python 的AWS 软件开发工具包 (Boto3) API 参考手册*》FHIRDatastores中的[列表](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/ListFHIRDatastores)。
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)中查找完整示例，了解如何进行设置和运行。

------
#### [ SAP ABAP ]

**适用于 SAP ABAP 的 SDK**  
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/hll#code-examples)中查找完整示例，了解如何进行设置和运行。

```
    TRY.
        oo_result = lo_hll->listfhirdatastores( ).
        DATA(lt_datastores) = oo_result->get_datastorepropertieslist( ).
        DATA(lv_datastore_count) = lines( lt_datastores ).
        MESSAGE |Found { lv_datastore_count } data store(s).| TYPE 'I'.
      CATCH /aws1/cx_hllvalidationex INTO DATA(lo_validation_ex).
        DATA(lv_error) = |Validation error: { lo_validation_ex->av_err_code }-{ lo_validation_ex->av_err_msg }|.
        MESSAGE lv_error TYPE 'I'.
        RAISE EXCEPTION lo_validation_ex.
      CATCH /aws1/cx_hllthrottlingex INTO DATA(lo_throttling_ex).
        lv_error = |Throttling error: { lo_throttling_ex->av_err_code }-{ lo_throttling_ex->av_err_msg }|.
        MESSAGE lv_error TYPE 'I'.
        RAISE EXCEPTION lo_throttling_ex.
    ENDTRY.
```
+  有关 API 的详细信息，请参阅适用于 SAP 的 *AWS SDK FHIRDatastores 中[列](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html)出 ABAP API 参考*。

------

**示例可用性**  
找不到所需的内容？ 使用本页右侧边栏上的 “**提供反馈**” 链接请求代码示例。

## AWS 控制台
<a name="managing-data-stores-list-console"></a>
+ 登录 HealthLake 控制台上的[数据存储](https://console.aws.amazon.com/healthlake/home#/list-datastores)页面。

  所有 HealthLake 数据存储都列在 “**数据存储**” 部分下。

# 标记 HealthLake 数据存储
<a name="managing-data-stores-tagging"></a>

您可以以标签的形式将元 HealthLake 数据分配给数据存储。每个标签都是由用户定义的键和值组成的标签。标签可帮助您管理、识别、组织、搜索和筛选数据存储。

**重要提示**  
请勿在标签中存储受保护的健康信息（PHI）、个人身份信息（PII）或其他机密或敏感信息。标签的用途并非用于私人或敏感数据。

以下主题介绍如何使用 AWS 管理控制台 AWS CLI、和 AWS SDKs使用 HealthLake 标记操作。有关更多信息，请参阅*AWS 一般参考 指南*中的为[AWS 资源添加标签](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html)。

**Topics**
+ [标记 HealthLake 数据存储](#tagresource)
+ [列出 HealthLake 数据存储的标签](#listtagsforresource)
+ [取消标记数据存储 HealthLake](#untagresource)

## 标记 HealthLake 数据存储
<a name="tagresource"></a>

`TagResource`用于标记 HealthLake 数据存储。以下菜单提供了操作步骤 AWS 管理控制台 和 AWS CLI 和的代码示例 AWS SDKs。有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_TagResource.html.html](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_TagResource.html.html)。

**为 HealthLake 数据存储添加标签**  
根据您的访问偏好选择菜单 AWS HealthLake。

### AWS CLI 和 SDKs
<a name="tagresource-cli-sdk"></a>

------
#### [ CLI ]

**AWS CLI**  
**向数据存储中添加标签**  
以下 `tag-resource` 示例演示如何向数据存储中添加标签。  

```
aws healthlake tag-resource \
    --resource-arn "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/0725c83f4307f263e16fd56b6d8ebdbe" \
    --tags '[{"Key": "key1", "Value": "value1"}]'
```
此命令不生成任何输出。  
有关更多信息，请参阅《*AWS HealthLake 开发人员指南》中的[向数据存储添加标签](https://docs.aws.amazon.com/healthlake/latest/devguide/add-a-tag.html)。* 。  
+  有关 API 的详细信息，请参阅*AWS CLI 命令参考[TagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/healthlake/tag-resource.html)*中的。

------
#### [ 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 tag_resource(self, resource_arn: str, tags: list[dict[str, str]]) -> None:
        """
        Tags a HealthLake resource.
        :param resource_arn: The resource ARN.
        :param tags: The tags to add to the resource.
        """
        try:
            self.health_lake_client.tag_resource(ResourceARN=resource_arn, Tags=tags)
        except ClientError as err:
            logger.exception(
                "Couldn't tag resource %s. Here's why %s",
                resource_arn,
                err.response["Error"]["Message"],
            )
            raise
```
+  有关 API 的详细信息，请参阅适用[TagResource](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/TagResource)于 *Python 的AWS SDK (Boto3) API 参考*。
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)中查找完整示例，了解如何进行设置和运行。

------
#### [ SAP ABAP ]

**适用于 SAP ABAP 的 SDK**  
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/hll#code-examples)中查找完整示例，了解如何进行设置和运行。

```
    TRY.
        " iv_resource_arn = 'arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6'
        lo_hll->tagresource(
          iv_resourcearn = iv_resource_arn
          it_tags = it_tags
        ).
        MESSAGE 'Resource tagged successfully.' TYPE 'I'.
      CATCH /aws1/cx_hllvalidationex INTO DATA(lo_validation_ex).
        DATA(lv_error) = |Validation error: { lo_validation_ex->av_err_code }-{ lo_validation_ex->av_err_msg }|.
        MESSAGE lv_error TYPE 'I'.
        RAISE EXCEPTION lo_validation_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 的详细信息，请参阅适用[TagResource](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html)于 S *AP 的AWS SDK ABAP API 参考*。

------

**示例可用性**  
找不到所需的内容？ 使用本页右侧边栏上的 “**提供反馈**” 链接请求代码示例。

### AWS 控制台
<a name="tagresource-console"></a>

1. 登录 HealthLake 控制台上的[数据存储](https://console.aws.amazon.com/healthlake/home#/list-datastores)页面。

1. 选择数据存储。

   **数据存储详细信息**页面将会打开。

1. 在 **标签** 部分中，选择 **管理标签**。

   将打开**管理标签**页面。

1. 选择 **添加新标签**。

1. 输入一个 **键**和可选的 **值**（可选）。

1. 选择**保存**。

## 列出 HealthLake 数据存储的标签
<a name="listtagsforresource"></a>

`ListTagsForResource`用于列出 HealthLake 数据存储的标签。以下菜单提供了操作步骤 AWS 管理控制台 和 AWS CLI 和的代码示例 AWS SDKs。有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_ListTagsForResource.html.html](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_ListTagsForResource.html.html)。

**列出 HealthLake 数据存储的标签**  
根据您的访问偏好选择菜单 AWS HealthLake。

### AWS CLI 和 SDKs
<a name="listtagsforresource-cli-sdk"></a>

------
#### [ CLI ]

**AWS CLI**  
**列出数据存储的标签**  
以下 `list-tags-for-resource` 示例列出与指定数据存储关联的标签。  

```
aws healthlake list-tags-for-resource \
    --resource-arn "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/0725c83f4307f263e16fd56b6d8ebdbe"
```
输出：  

```
{
    "tags": {
        "key": "value",
        "key1": "value1"
    }
}
```
有关更多信息，请参阅《 AWS HealthLake 开发人员指南》[AWS HealthLake中的为资源添加标签](https://docs.aws.amazon.com/healthlake/latest/devguide/tagging.html)。  
+  有关 API 的详细信息，请参阅*AWS CLI 命令参考[ListTagsForResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/healthlake/list-tags-for-resource.html)*中的。

------
#### [ 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 list_tags_for_resource(self, resource_arn: str) -> dict[str, str]:
        """
        Lists the tags for a HealthLake resource.
        :param resource_arn: The resource ARN.
        :return: The tags for the resource.
        """
        try:
            response = self.health_lake_client.list_tags_for_resource(
                ResourceARN=resource_arn
            )
            return response["Tags"]
        except ClientError as err:
            logger.exception(
                "Couldn't list tags for resource %s. Here's why %s",
                resource_arn,
                err.response["Error"]["Message"],
            )
            raise
```
+  有关 API 的详细信息，请参阅适用[ListTagsForResource](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/ListTagsForResource)于 *Python 的AWS SDK (Boto3) API 参考*。
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)中查找完整示例，了解如何进行设置和运行。

------
#### [ SAP ABAP ]

**适用于 SAP ABAP 的 SDK**  
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/hll#code-examples)中查找完整示例，了解如何进行设置和运行。

```
    TRY.
        " iv_resource_arn = 'arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6'
        DATA(lo_result) = lo_hll->listtagsforresource(
          iv_resourcearn = iv_resource_arn
        ).
        ot_tags = lo_result->get_tags( ).
        DATA(lv_tag_count) = lines( ot_tags ).
        MESSAGE |Found { lv_tag_count } tag(s).| TYPE 'I'.
      CATCH /aws1/cx_hllvalidationex INTO DATA(lo_validation_ex).
        DATA(lv_error) = |Validation error: { lo_validation_ex->av_err_code }-{ lo_validation_ex->av_err_msg }|.
        MESSAGE lv_error TYPE 'I'.
        RAISE EXCEPTION lo_validation_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 的详细信息，请参阅适用[ListTagsForResource](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html)于 S *AP 的AWS SDK ABAP API 参考*。

------

**示例可用性**  
找不到所需的内容？ 使用本页右侧边栏上的 “**提供反馈**” 链接请求代码示例。

### AWS 控制台
<a name="listtagsforresource-console"></a>

1. 登录 HealthLake 控制台上的[数据存储](https://console.aws.amazon.com/healthlake/home#/list-datastores)页面。

1. 选择数据存储。

   **数据存储详细信息**页面将会打开。在**标签**部分下，列出了所有数据存储标签。

## 取消标记数据存储 HealthLake
<a name="untagresource"></a>

`UntagResource`用于从 HealthLake 数据存储中移除标签。以下菜单提供了操作步骤 AWS 管理控制台 和 AWS CLI 和的代码示例 AWS SDKs。有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_UntagResource.html.html](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_UntagResource.html.html)。

**取消对 HealthLake 数据存储的标记**  
根据您的访问偏好选择菜单 AWS HealthLake。

### AWS CLI 和 SDKs
<a name="untagresource-cli-sdk"></a>

------
#### [ CLI ]

**AWS CLI**  
**从数据存储中移除标签**  
以下 `untag-resource` 示例演示如何从数据存储中移除标签。  

```
aws healthlake untag-resource \
    --resource-arn "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/b91723d65c6fdeb1d26543a49d2ed1fa" \
    --tag-keys '["key1"]'
```
此命令不生成任何输出。  
有关更多信息，请参阅《*AWS HealthLake 开发人员指南》*中的[从数据存储中移除标签](https://docs.aws.amazon.com/healthlake/latest/devguide/remove-tags.html)。  
+  有关 API 的详细信息，请参阅*AWS CLI 命令参考[UntagResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/healthlake/untag-resource.html)*中的。

------
#### [ 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 untag_resource(self, resource_arn: str, tag_keys: list[str]) -> None:
        """
        Untags a HealthLake resource.
        :param resource_arn: The resource ARN.
        :param tag_keys: The tag keys to remove from the resource.
        """
        try:
            self.health_lake_client.untag_resource(
                ResourceARN=resource_arn, TagKeys=tag_keys
            )
        except ClientError as err:
            logger.exception(
                "Couldn't untag resource %s. Here's why %s",
                resource_arn,
                err.response["Error"]["Message"],
            )
            raise
```
+  有关 API 的详细信息，请参阅适用[UntagResource](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/UntagResource)于 *Python 的AWS SDK (Boto3) API 参考*。
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)中查找完整示例，了解如何进行设置和运行。

------
#### [ SAP ABAP ]

**适用于 SAP ABAP 的 SDK**  
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/hll#code-examples)中查找完整示例，了解如何进行设置和运行。

```
    TRY.
        " iv_resource_arn = 'arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6'
        lo_hll->untagresource(
          iv_resourcearn = iv_resource_arn
          it_tagkeys = it_tag_keys
        ).
        MESSAGE 'Resource untagged successfully.' TYPE 'I'.
      CATCH /aws1/cx_hllvalidationex INTO DATA(lo_validation_ex).
        DATA(lv_error) = |Validation error: { lo_validation_ex->av_err_code }-{ lo_validation_ex->av_err_msg }|.
        MESSAGE lv_error TYPE 'I'.
        RAISE EXCEPTION lo_validation_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 的详细信息，请参阅适用[UntagResource](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html)于 S *AP 的AWS SDK ABAP API 参考*。

------

**示例可用性**  
找不到所需的内容？ 使用本页右侧边栏上的 “**提供反馈**” 链接请求代码示例。

### AWS 控制台
<a name="untagresource-console"></a>

1. 登录 HealthLake 控制台上的[数据存储](https://console.aws.amazon.com/healthlake/home#/list-datastores)页面。

1. 选择数据存储。

   **数据存储详细信息**页面将会打开。

1. 在 **标签** 部分中，选择 **管理标签**。

   将打开**管理标签**页面。

1. 在标签旁选择 **移除**，以移除标签。

1. 选择**保存**。

# 删除 HealthLake 数据存储
<a name="managing-data-stores-delete"></a>

`DeleteFHIRDatastore`用于删除 HealthLake 数据存储。以下菜单提供了操作步骤 AWS 管理控制台 和 AWS CLI 和的代码示例 AWS SDKs。有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_DeleteFHIRDatastores.html](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_DeleteFHIRDatastores.html)。

**删除 HealthLake 数据存储**  
根据您的访问偏好选择菜单 AWS HealthLake。

## AWS CLI 和 SDKs
<a name="managing-data-stores-delete-cli-sdk"></a>

------
#### [ 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 命令参考*》中的 [“删除”](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/healthlake/delete-fhir-datastore.html)。

------
#### [ 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 中[删除](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/DeleteFHIRDatastore) (Boto3) API 参考*。
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)中查找完整示例，了解如何进行设置和运行。

------
#### [ SAP ABAP ]

**适用于 SAP ABAP 的 SDK**  
 还有更多相关信息 GitHub。在 [AWS 代码示例存储库](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/hll#code-examples)中查找完整示例，了解如何进行设置和运行。

```
    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 中[删除](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) ABAP API 参考*。

------

**示例可用性**  
找不到所需的内容？ 使用本页右侧边栏上的 “**提供反馈**” 链接请求代码示例。

## AWS 控制台
<a name="managing-data-stores-delete-console"></a>

1. 登录 HealthLake 控制台上的[数据存储](https://console.aws.amazon.com/healthlake/home#/list-datastores)页面。

1. 选择数据存储。

   **数据存储详细信息**页面将会打开。

1. 选择**删除**。

   **删除数据存储**页面将会打开。

1. 要确认删除数据存储，请在文本输入字段中输入数据存储名称。

1. 选择**删除**。