Deletes specified tags from a resource in the current region.
Parameters:
-
resource_arn
(str)
–
The Amazon Resource Name (ARN) of the resource that you want to untag.
-
tag_keys
(Optional[__listOfString], default:
None
)
–
The keys of the tags to be removed.
Raises:
-
BadRequestException
–
This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message.
-
InternalServerErrorException
–
The server encountered an internal error and is unable to complete the request.
-
NotFoundException
–
One or more of the resources in the request does not exist in the system.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_mediaconnect/_services/async_media_connect.py
| async def untag_resource(
self,
resource_arn: str,
*,
config_overrides: Optional[AsyncMediaConnectClientConfig] = None,
tag_keys: Optional[
"capo_mediaconnect.types.__list_of_string.__listOfString"
] = None,
) -> None:
"""<p> Deletes specified tags from a resource in the current region.</p>
Args:
resource_arn: <p> The Amazon Resource Name (ARN) of the resource that you want to untag. </p>
tag_keys: <p>The keys of the tags to be removed. </p>
Raises:
capo_mediaconnect.errors.bad_request_exception.BadRequestException: <p>This exception is thrown if the request contains a semantic error. The precise meaning depends on the API, and is documented in the error message. </p>
capo_mediaconnect.errors.internal_server_error_exception.InternalServerErrorException: <p>The server encountered an internal error and is unable to complete the request. </p>
capo_mediaconnect.errors.not_found_exception.NotFoundException: <p>One or more of the resources in the request does not exist in the system. </p>
capo_mediaconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_mediaconnect.types.untag_resource_request.UntagResourceRequest]",
) -> AsyncOperationResponse[None]:
import capo_mediaconnect._operations.media_connect.untag_resource
(
output,
http_response,
) = await capo_mediaconnect._operations.media_connect.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_mediaconnect.types.untag_resource_request.UntagResourceRequest = {
"resource_arn": resource_arn
}
if tag_keys is not None:
input_["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
|