Removes the specified tags from a resource.
Parameters:
-
resource_arn
(Arn)
–
The Amazon Resource Name (ARN) of the resource to remove tags from.
-
tag_keys
(StringList)
–
The keys of the tags to remove from the resource.
Raises:
Source code in docs_src/capo_socialmessaging/_services/social_messaging.py
| def untag_resource(
self,
resource_arn: "capo_socialmessaging.types.arn.Arn",
tag_keys: "capo_socialmessaging.types.string_list.StringList",
*,
config_overrides: Optional[SocialMessagingClientConfig] = None,
) -> "capo_socialmessaging.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 to remove tags from.</p>
tag_keys: <p>The keys of the tags to remove from the resource.</p>
Raises:
capo_socialmessaging.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_socialmessaging.errors.validation_exception.ValidationException: <p>The request contains an invalid parameter value. </p>
capo_socialmessaging.errors.internal_service_exception.InternalServiceException: <p>The request processing has failed because of an unknown error, exception, or failure.</p>
capo_socialmessaging.errors.invalid_parameters_exception.InvalidParametersException: <p>One or more parameters provided to the action are not valid.</p>
capo_socialmessaging.errors.throttled_request_exception.ThrottledRequestException: <p>The request was denied due to request throttling.</p>
capo_socialmessaging.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_socialmessaging.types.untag_resource_input.UntagResourceInput]",
) -> OperationResponse[
"capo_socialmessaging.types.untag_resource_output.UntagResourceOutput"
]:
import capo_socialmessaging._operations.social_messaging.untag_resource
output, http_response = (
capo_socialmessaging._operations.social_messaging.untag_resource.untag_resource(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UntagResource")
)
input_: capo_socialmessaging.types.untag_resource_input.UntagResourceInput = {
"resource_arn": resource_arn,
"tag_keys": tag_keys,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|