async def tag_resource(
self,
resource_arn: "capo_appfabric.types.arn.Arn",
tags: "capo_appfabric.types.tag_list.TagList",
*,
config_overrides: Optional[AsyncAppFabricClientConfig] = None,
) -> "capo_appfabric.types.tag_resource_response.TagResourceResponse":
"""<p>Assigns one or more tags (key-value pairs) to the specified resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource that you want to tag.</p>
tags: <p>A map of the key-value pairs of the tag or tags to assign to the resource.</p>
Raises:
capo_appfabric.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to perform this operation.</p>
capo_appfabric.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure with an internal server.</p>
capo_appfabric.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_appfabric.errors.throttling_exception.ThrottlingException: <p>The request rate exceeds the limit.</p>
capo_appfabric.errors.validation_exception.ValidationException: <p>The request has invalid or missing parameters.</p>
capo_appfabric.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_appfabric.types.tag_resource_request.TagResourceRequest]",
) -> AsyncOperationResponse[
"capo_appfabric.types.tag_resource_response.TagResourceResponse"
]:
import capo_appfabric._operations.fabric_front_end_service.tag_resource
(
output,
http_response,
) = await capo_appfabric._operations.fabric_front_end_service.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_appfabric.types.tag_resource_request.TagResourceRequest = {
"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