def tag_resource(
self,
resource_arn: "capo_service_quotas.types.amazon_resource_name.AmazonResourceName",
tags: "capo_service_quotas.types.input_tags.InputTags",
*,
config_overrides: Optional[ServiceQuotasClientConfig] = None,
) -> "capo_service_quotas.types.tag_resource_response.TagResourceResponse":
"""<p>Adds tags to the specified applied quota. You can include one or more tags to add to the quota.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) for the applied quota. You can get this information by using the Service Quotas console, or by listing the quotas using the <a href="https://docs.aws.amazon.com/cli/latest/reference/service-quotas/list-service-quotas.html">list-service-quotas</a> CLI command or the <a href="https://docs.aws.amazon.com/servicequotas/2019-06-24/apireference/API_ListServiceQuotas.html">ListServiceQuotas</a> Amazon Web Services API operation.</p>
tags: <p>The tags that you want to add to the resource.</p>
Raises:
capo_service_quotas.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permission to perform this action.</p>
capo_service_quotas.errors.illegal_argument_exception.IllegalArgumentException: <p>Invalid input was provided.</p>
capo_service_quotas.errors.no_such_resource_exception.NoSuchResourceException: <p>The specified resource does not exist.</p>
capo_service_quotas.errors.service_exception.ServiceException: <p>Something went wrong.</p>
capo_service_quotas.errors.tag_policy_violation_exception.TagPolicyViolationException: <p>The specified tag is a reserved word and cannot be used.</p>
capo_service_quotas.errors.too_many_requests_exception.TooManyRequestsException: <p>Due to throttling, the request was denied. Slow down the rate of request calls, or request an increase for this quota.</p>
capo_service_quotas.errors.too_many_tags_exception.TooManyTagsException: <p>You've exceeded the number of tags allowed for a resource. For more information, see <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/sq-tagging.html#sq-tagging-restrictions">Tag restrictions</a> in the <i>Service Quotas User Guide</i>.</p>
capo_service_quotas.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_service_quotas.types.tag_resource_request.TagResourceRequest]",
) -> OperationResponse[
"capo_service_quotas.types.tag_resource_response.TagResourceResponse"
]:
import capo_service_quotas._operations.service_quotas_v20190624.tag_resource
output, http_response = (
capo_service_quotas._operations.service_quotas_v20190624.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_service_quotas.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