Adds or overwrites one or more tags for a support permit resource.
Parameters:
-
resource_arn
(Arn)
–
The ARN of the resource to tag.
-
tags
(Tags)
–
The tags to add to the resource. Maximum of 50 tags.
Raises:
Source code in docs_src/capo_supportauthz/_services/async_support_auth_z.py
| async def tag_resource(
self,
resource_arn: "capo_supportauthz.types.arn.Arn",
tags: "capo_supportauthz.types.tags.Tags",
*,
config_overrides: Optional[AsyncSupportAuthZClientConfig] = None,
) -> "capo_supportauthz.types.tag_resource_output.TagResourceOutput":
"""<p>Adds or overwrites one or more tags for a support permit resource.</p>
Args:
resource_arn: <p>The ARN of the resource to tag.</p>
tags: <p>The tags to add to the resource. Maximum of 50 tags.</p>
Raises:
capo_supportauthz.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this operation.</p>
capo_supportauthz.errors.internal_server_exception.InternalServerException: <p>An internal service error occurred. Try again later.</p>
capo_supportauthz.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
capo_supportauthz.errors.throttling_exception.ThrottlingException: <p>The request rate exceeded the allowed limit. Try again later.</p>
capo_supportauthz.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
capo_supportauthz.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_supportauthz.types.tag_resource_input.TagResourceInput]",
) -> AsyncOperationResponse[
"capo_supportauthz.types.tag_resource_output.TagResourceOutput"
]:
import capo_supportauthz._operations.support_auth_z.tag_resource
(
output,
http_response,
) = await capo_supportauthz._operations.support_auth_z.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_supportauthz.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
|