async def tag_resource(
self,
resource_arn: "capo_cleanrooms.types.cleanrooms_arn.CleanroomsArn",
tags: "capo_cleanrooms.types.tag_map.TagMap",
*,
config_overrides: Optional[AsyncCleanRoomsClientConfig] = None,
) -> "capo_cleanrooms.types.tag_resource_output.TagResourceOutput":
"""<p>Tags a resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) associated with the resource you want to tag.</p>
tags: <p>A map of objects specifying each key name and value.</p>
Raises:
capo_cleanrooms.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
capo_cleanrooms.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints.</p>
capo_cleanrooms.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cleanrooms.types.tag_resource_input.TagResourceInput]",
) -> AsyncOperationResponse[
"capo_cleanrooms.types.tag_resource_output.TagResourceOutput"
]:
import capo_cleanrooms._operations.aws_bastion_control_plane_service_lambda.tag_resource
(
output,
http_response,
) = await capo_cleanrooms._operations.aws_bastion_control_plane_service_lambda.tag_resource.async_tag_resource(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("TagResource")
)
input_: capo_cleanrooms.types.tag_resource_input.TagResourceInput = {
"resource_arn": resource_arn,
"tags": tags,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output