Removes tags from a resource.
Parameters:
-
resource_arn
(ResourceArn)
–
The Amazon Resource Name (ARN) of the resource to remove tags from.
-
tag_keys
(TagKeyList)
–
The list of tag keys to remove from the resource.
Raises:
Source code in docs_src/capo_securityagent/_services/async_security_agent.py
| async def untag_resource(
self,
resource_arn: "capo_securityagent.types.resource_arn.ResourceArn",
tag_keys: "capo_securityagent.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.untag_resource_output.UntagResourceOutput":
"""<p>Removes 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 list of tag keys to remove from the resource.</p>
Raises:
capo_securityagent.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_securityagent.types.untag_resource_input.UntagResourceInput]",
) -> AsyncOperationResponse[
"capo_securityagent.types.untag_resource_output.UntagResourceOutput"
]:
import capo_securityagent._operations.security_agent.untag_resource
(
output,
http_response,
) = await capo_securityagent._operations.security_agent.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_securityagent.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
|