Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use UntagResource with an AWS SDK or CLI - AWS SDK Code Examples

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

There are more AWS SDK examples available in the AWS Doc SDK Examples GitHub repo.

Use UntagResource with an AWS SDK or CLI

The following code examples show how to use UntagResource.

CLI
AWS CLI

To remove tags from a data store.

The following untag-resource example shows how to remove tags from a data store.

aws healthlake untag-resource \ --resource-arn "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/b91723d65c6fdeb1d26543a49d2ed1fa" \ --tag-keys '["key1"]'

This command produces no output.

For more information, see Removing tags from a data store in the AWS HealthLake Developer Guide.

  • For API details, see UntagResource in AWS CLI Command Reference.

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
  • For API details, see UntagResource in AWS SDK for Python (Boto3) API Reference.

Note

There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository.

AWS CLI

To remove tags from a data store.

The following untag-resource example shows how to remove tags from a data store.

aws healthlake untag-resource \ --resource-arn "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/b91723d65c6fdeb1d26543a49d2ed1fa" \ --tag-keys '["key1"]'

This command produces no output.

For more information, see Removing tags from a data store in the AWS HealthLake Developer Guide.

  • For API details, see UntagResource in AWS CLI Command Reference.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.