

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# HealthLake 데이터 스토어에 태그 지정
<a name="managing-data-stores-tagging"></a>

태그 형태로 HealthLake 데이터 스토어에 메타데이터를 할당할 수 있습니다. 각 태그는 사용자 정의 키와 값으로 구성된 레이블입니다. 태그는 데이터 스토어를 관리, 식별, 구성, 검색 및 필터링하는 데 도움이 됩니다.

**중요**  
개인 식별 정보(PII)나 기타 기밀 정보 또는 민감한 정보를 태그에 저장하지 마십시오. 태그는 개인 데이터나 민감한 데이터에 사용하기 위한 것이 아닙니다.

다음 주제에서는 AWS Management Console 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 Management Console 및 AWS SDKs의 AWS CLI 및 코드 예제에 대한 절차를 제공합니다. 자세한 내용을 알아보려면 [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 ]

**SDK for 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 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 세부 정보는 *AWS SDK for Python (Boto3) API 참조*의 [TagResource](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/TagResource)를 참조하세요.
 GitHub에 더 많은 내용이 있습니다. [AWS 코드 예 리포지토리](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)에서 전체 예를 찾고 설정 및 실행하는 방법을 배워보세요.

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

**SDK for SAP ABAP API**  
 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 세부 정보는 *AWS SDK for SAP ABAP API 참조의 *[TagResource](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html)를 참조하세요.

------

**예제 가용성**  
필요한 예제를 찾을 수 없습니까? 이 페이지의 오른쪽 사이드바에 있는 **피드백 제공** 링크를 사용하여 코드 예제를 요청합니다.

### 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 Management Console 및 AWS SDKs의 AWS CLI 및 코드 예제에 대한 절차를 제공합니다. 자세한 내용을 알아보려면 [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 개발자 안내서의HealthLake에서 리소스 태그 지정](https://docs.aws.amazon.com/healthlake/latest/devguide/tagging.html)을 참조하세요. AWS HealthLake   
+  API 세부 정보는 *AWS CLI 명령 참조*의 [ListTagsForResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/healthlake/list-tags-for-resource.html)를 참조하세요.

------
#### [ Python ]

**SDK for 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 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 세부 정보는 *AWS SDK for Python (Boto3) API 참조*의 [ListTagsForResource](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/ListTagsForResource)를 참조하세요.
 GitHub에 더 많은 내용이 있습니다. [AWS 코드 예 리포지토리](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)에서 전체 예를 찾고 설정 및 실행하는 방법을 배워보세요.

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

**SDK for SAP ABAP API**  
 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 세부 정보는 SDK for SAP ABAP API 참조의 [ListTagsForResource](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html)를 참조하세요. *AWS * 

------

**예제 가용성**  
필요한 예제를 찾을 수 없습니까? 이 페이지의 오른쪽 사이드바에 있는 **피드백 제공** 링크를 사용하여 코드 예제를 요청합니다.

### 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 Management Console 및 AWS SDKs의 AWS CLI 및 코드 예제에 대한 절차를 제공합니다. 자세한 내용을 알아보려면 [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 ]

**SDK for 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 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 세부 정보는 *AWS SDK for Python (Boto3) API 참조*의 [UntagResource](https://docs.aws.amazon.com/goto/boto3/healthlake-2017-07-01/UntagResource)를 참조하세요.
 GitHub에 더 많은 내용이 있습니다. [AWS 코드 예 리포지토리](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/python/example_code/healthlake#code-examples)에서 전체 예를 찾고 설정 및 실행하는 방법을 배워보세요.

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

**SDK for SAP ABAP API**  
 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 세부 정보는 *AWS SDK for SAP ABAP API 참조*의 [UntagResource](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html)를 참조하세요.

------

**예제 가용성**  
필요한 예제를 찾을 수 없습니까? 이 페이지의 오른쪽 사이드바에 있는 **피드백 제공** 링크를 사용하여 코드 예제를 요청합니다.

### AWS 콘솔
<a name="untagresource-console"></a>

1. HealthLake 콘솔의 [데이터 스토어](https://console.aws.amazon.com/healthlake/home#/list-datastores) 페이지에 로그인합니다.

1. 데이터 스토어를 선택합니다.

   **데이터 스토어 세부 정보** 페이지가 열립니다.

1. **태그** 섹션에서 **태그 관리**를 선택합니다.

   **태그 관리** 페이지가 열립니다.

1. 제거할 태그 옆에 있는 **제거**를 선택합니다.

1. **저장**을 선택합니다.