async def tag_resource(
self,
arn: "capo_bcm_pricing_calculator.types.arn.Arn",
tags: "capo_bcm_pricing_calculator.types.tags.Tags",
*,
config_overrides: Optional[AsyncBCMPricingCalculatorClientConfig] = None,
) -> "capo_bcm_pricing_calculator.types.tag_resource_response.TagResourceResponse":
"""<p> Adds one or more tags to a specified resource. </p>
Args:
arn: <p> The Amazon Resource Name (ARN) of the resource to add tags to. </p>
tags: <p> The tags to add to the resource. </p>
Raises:
capo_bcm_pricing_calculator.errors.access_denied_exception.AccessDeniedException: <p> You do not have sufficient access to perform this action. </p>
capo_bcm_pricing_calculator.errors.internal_server_exception.InternalServerException: <p> An internal error has occurred. Retry your request, but if the problem persists, contact Amazon Web Services support. </p>
capo_bcm_pricing_calculator.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
capo_bcm_pricing_calculator.errors.validation_exception.ValidationException: <p> The input provided fails to satisfy the constraints specified by an Amazon Web Services service. </p>
capo_bcm_pricing_calculator.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified resource was not found. </p>
capo_bcm_pricing_calculator.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> The request would cause you to exceed your service quota. </p>
capo_bcm_pricing_calculator.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_bcm_pricing_calculator.types.tag_resource_request.TagResourceRequest]",
) -> AsyncOperationResponse[
"capo_bcm_pricing_calculator.types.tag_resource_response.TagResourceResponse"
]:
import capo_bcm_pricing_calculator._operations.awsbcm_pricing_calculator.tag_resource
(
output,
http_response,
) = await capo_bcm_pricing_calculator._operations.awsbcm_pricing_calculator.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_bcm_pricing_calculator.types.tag_resource_request.TagResourceRequest = {
"arn": arn,
"tags": tags,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output