Removes one or more tags from a specified resource.
Parameters:
-
arn
(Arn)
–
The Amazon Resource Name (ARN) of the resource to remove tags from.
-
tag_keys
(ResourceTagKeys)
–
The keys of the tags to remove from the resource.
Raises:
-
AccessDeniedException
–
The request is denied because you don't have sufficient permissions to perform this operation. Verify that you have the required permissions and try again.
-
InternalServerException
–
An internal error has occurred. Retry your request, but if the problem persists, contact Amazon Web Services support.
-
ThrottlingException
–
The request was denied due to request throttling.
-
ValidationException
–
The input provided fails to satisfy the constraints specified by an Amazon Web Services service.
-
ResourceNotFoundException
–
The specified resource wasn't found.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_bcm_pricing_calculator/_services/bcm_pricing_calculator.py
| def untag_resource(
self,
arn: "capo_bcm_pricing_calculator.types.arn.Arn",
tag_keys: "capo_bcm_pricing_calculator.types.resource_tag_keys.ResourceTagKeys",
*,
config_overrides: Optional[BCMPricingCalculatorClientConfig] = None,
) -> "capo_bcm_pricing_calculator.types.untag_resource_response.UntagResourceResponse":
"""<p> Removes one or more tags from a specified resource. </p>
Args:
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_bcm_pricing_calculator.errors.access_denied_exception.AccessDeniedException: <p> The request is denied because you don't have sufficient permissions to perform this operation. Verify that you have the required permissions and try again. </p>
capo_bcm_pricing_calculator.errors.internal_server_exception.InternalServerException: <p> An internal error has occurred. Retry your request, but if the problem persists, contact Amazon Web Services support. </p>
capo_bcm_pricing_calculator.errors.throttling_exception.ThrottlingException: <p> The request was denied due to request throttling. </p>
capo_bcm_pricing_calculator.errors.validation_exception.ValidationException: <p> The input provided fails to satisfy the constraints specified by an Amazon Web Services service. </p>
capo_bcm_pricing_calculator.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified resource wasn't found. </p>
capo_bcm_pricing_calculator.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_bcm_pricing_calculator.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_bcm_pricing_calculator.types.untag_resource_response.UntagResourceResponse"
]:
import capo_bcm_pricing_calculator._operations.awsbcm_pricing_calculator.untag_resource
output, http_response = (
capo_bcm_pricing_calculator._operations.awsbcm_pricing_calculator.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_bcm_pricing_calculator.types.untag_resource_request.UntagResourceRequest = {
"arn": arn,
"tag_keys": tag_keys,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|