Add a user-specifed key and value tag to a data store.
Parameters:
-
resource_arn
(AmazonResourceName)
–
The Amazon Resource Name (ARN) that grants access to the data store tags are being added to.
-
tags
(TagList)
–
The user-specified key and value pair tags being added to a data store.
Raises:
Source code in docs_src/capo_healthlake/_services/health_lake.py
| def tag_resource(
self,
resource_arn: "capo_healthlake.types.amazon_resource_name.AmazonResourceName",
tags: "capo_healthlake.types.tag_list.TagList",
*,
config_overrides: Optional[HealthLakeClientConfig] = None,
) -> "capo_healthlake.types.tag_resource_response.TagResourceResponse":
"""<p>Add a user-specifed key and value tag to a data store.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) that grants access to the data store tags are being added to.</p>
tags: <p>The user-specified key and value pair tags being added to a data store.</p>
Raises:
capo_healthlake.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested data store was not found.</p>
capo_healthlake.errors.validation_exception.ValidationException: <p>The user input parameter was invalid.</p>
capo_healthlake.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_healthlake.types.tag_resource_request.TagResourceRequest]",
) -> OperationResponse[
"capo_healthlake.types.tag_resource_response.TagResourceResponse"
]:
import capo_healthlake._operations.health_lake.tag_resource
output, http_response = (
capo_healthlake._operations.health_lake.tag_resource.tag_resource(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("TagResource")
)
input_: capo_healthlake.types.tag_resource_request.TagResourceRequest = {
"resource_arn": resource_arn,
"tags": tags,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|