Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.
Parameters:
-
resource_arn
(Arn)
–
The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see ResourceTag.
-
resource_tag_keys
(ResourceTagKeyList)
–
A list of tag keys associated with tags that need to be removed from the resource. If you specify a tag key that doesn't exist, it's ignored. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.
Raises:
Source code in docs_src/capo_cost_explorer/_services/cost_explorer.py
| def untag_resource(
self,
resource_arn: "capo_cost_explorer.types.arn.Arn",
resource_tag_keys: "capo_cost_explorer.types.resource_tag_key_list.ResourceTagKeyList",
*,
config_overrides: Optional[CostExplorerClientConfig] = None,
) -> "capo_cost_explorer.types.untag_resource_response.UntagResourceResponse":
"""<p>Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value. </p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_ResourceTag.html">ResourceTag</a>. </p>
resource_tag_keys: <p>A list of tag keys associated with tags that need to be removed from the resource. If you specify a tag key that doesn't exist, it's ignored. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use. </p>
Raises:
capo_cost_explorer.errors.limit_exceeded_exception.LimitExceededException: <p>You made too many calls in a short period of time. Try again later.</p>
capo_cost_explorer.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified ARN in the request doesn't exist. </p>
capo_cost_explorer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cost_explorer.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_cost_explorer.types.untag_resource_response.UntagResourceResponse"
]:
import capo_cost_explorer._operations.aws_insights_index_service.untag_resource
output, http_response = (
capo_cost_explorer._operations.aws_insights_index_service.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_cost_explorer.types.untag_resource_request.UntagResourceRequest = {
"resource_arn": resource_arn,
"resource_tag_keys": resource_tag_keys,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|