Removes tags from the specified resource.
Parameters:
-
arn
(AmazonResourceName)
–
The ARN of the resource from which the specified tags should be removed.
-
tag_keys
(TagKeyList)
–
The list of tag keys that should be removed from the resource.
Raises:
Examples:
Remove Tags
>>> await client.untag_resource(arn='arn:aws:interconnect:us-east-1:000000000000:connection/mcc-abc12345', tag_keys=['TagKey1', 'TagKey2'])
Source code in docs_src/capo_interconnect/_services/async_interconnect.py
| async def untag_resource(
self,
arn: "capo_interconnect.types.amazon_resource_name.AmazonResourceName",
tag_keys: "capo_interconnect.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[AsyncInterconnectClientConfig] = None,
) -> "capo_interconnect.types.untag_resource_response.UntagResourceResponse":
"""<p>Removes tags from the specified resource.</p>
Args:
arn: <p>The ARN of the resource from which the specified tags should be removed.</p>
tag_keys: <p>The list of tag keys that should be removed from the resource.</p>
Raises:
capo_interconnect.errors.access_denied_exception.AccessDeniedException: <p>The calling principal is not allowed to access the specified resource, or the resource does not exist.</p>
capo_interconnect.errors.interconnect_client_exception.InterconnectClientException: <p>The request was denied due to incorrect client supplied parameters.</p>
capo_interconnect.errors.interconnect_server_exception.InterconnectServerException: <p>The request resulted in an exception internal to the service.</p>
capo_interconnect.errors.interconnect_validation_exception.InterconnectValidationException: <p>The input fails to satisfy the constraints specified.</p>
capo_interconnect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request specifies a resource that does not exist on the server.</p>
capo_interconnect.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The requested operation would result in the calling principal exceeding their allotted quota.</p>
capo_interconnect.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_interconnect.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Remove Tags
>>> await client.untag_resource(arn='arn:aws:interconnect:us-east-1:000000000000:connection/mcc-abc12345', tag_keys=['TagKey1', 'TagKey2'])
"""
async def _handler(
req: "AsyncOperationRequest[capo_interconnect.types.untag_resource_request.UntagResourceRequest]",
) -> AsyncOperationResponse[
"capo_interconnect.types.untag_resource_response.UntagResourceResponse"
]:
import capo_interconnect._operations.interconnect.untag_resource
(
output,
http_response,
) = await capo_interconnect._operations.interconnect.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_interconnect.types.untag_resource_request.UntagResourceRequest = {
"arn": 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
|