Removes the specified tags from a resource.
Parameters:
-
resource_arn
(AmazonResourceName)
–
The Amazon Resource Name (ARN) of the resource.
-
tag_keys
(TagKeyList)
–
The list of tag keys to remove from the resource.
Raises:
-
AccessDeniedException
–
You do not have sufficient access to perform this action.
-
InternalServerException
–
An unexpected error occurred during the processing of the request.
-
ResourceNotFoundException
–
The request references a resource that does not exist. Verify that the resource identifier is correct and try your request again.
-
ThrottlingException
–
The request was denied because it exceeded the allowed request rate.
-
ValidationException
–
A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
Remove tags from a resource
>>> await client.untag_resource(resource_arn='arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234', tag_keys=['Environment'])
Source code in docs_src/capo_endusermessaging/_services/async_end_user_messaging.py
| async def untag_resource(
self,
resource_arn: "capo_endusermessaging.types.amazon_resource_name.AmazonResourceName",
tag_keys: "capo_endusermessaging.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[AsyncEndUserMessagingClientConfig] = None,
) -> "capo_endusermessaging.types.untag_resource_output.UntagResourceOutput":
"""<p>Removes the specified tags from a resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource.</p>
tag_keys: <p>The list of tag keys to remove from the resource.</p>
Raises:
capo_endusermessaging.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_endusermessaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request.</p>
capo_endusermessaging.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist. Verify that the resource identifier is correct and try your request again.</p>
capo_endusermessaging.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded the allowed request rate.</p>
capo_endusermessaging.errors.validation_exception.ValidationException: A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.
capo_endusermessaging.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Remove tags from a resource
>>> await client.untag_resource(resource_arn='arn:aws:end-user-messaging:us-east-1:123456789012:brand-profile/bp-abc12345678901234', tag_keys=['Environment'])
"""
async def _handler(
req: "AsyncOperationRequest[capo_endusermessaging.types.untag_resource_input.UntagResourceInput]",
) -> AsyncOperationResponse[
"capo_endusermessaging.types.untag_resource_output.UntagResourceOutput"
]:
import capo_endusermessaging._operations.end_user_messaging.untag_resource
(
output,
http_response,
) = await capo_endusermessaging._operations.end_user_messaging.untag_resource.async_untag_resource(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UntagResource")
)
input_: capo_endusermessaging.types.untag_resource_input.UntagResourceInput = {
"resource_arn": resource_arn,
"tag_keys": tag_keys,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|