Skip to content

untag_resource

untag_resource(
    resource_arn: AmazonResourceName,
    resource_tag_keys: ResourceTagKeyList,
    *,
    config_overrides: Optional[BudgetsClientConfig] = None,
) -> UntagResourceResponse

Deletes tags associated with a budget or budget action resource.

Parameters:

Raises:

  • AccessDeniedException –

    You are not authorized to use this operation with the given parameters.

  • InternalErrorException –

    An error on the server occurred during the processing of your request. Try again later.

  • InvalidParameterException –

    An error on the client occurred. Typically, the cause is an invalid input value.

  • NotFoundException –

    We can’t locate the resource that you specified.

  • ThrottlingException –

    The number of API requests has exceeded the maximum allowed API request throttling limit for the account.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_budgets/_services/budgets.py
def untag_resource(
    self,
    resource_arn: "capo_budgets.types.amazon_resource_name.AmazonResourceName",
    resource_tag_keys: "capo_budgets.types.resource_tag_key_list.ResourceTagKeyList",
    *,
    config_overrides: Optional[BudgetsClientConfig] = None,
) -> "capo_budgets.types.untag_resource_response.UntagResourceResponse":
    """<p>Deletes tags associated with a budget or budget action resource.</p>

    Args:
        resource_arn: <p>The unique identifier for the resource.</p>
        resource_tag_keys: <p>The key that's associated with the tag.</p>

    Raises:
        capo_budgets.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to use this operation with the given parameters.</p>
        capo_budgets.errors.internal_error_exception.InternalErrorException: <p>An error on the server occurred during the processing of your request. Try again later.</p>
        capo_budgets.errors.invalid_parameter_exception.InvalidParameterException: <p>An error on the client occurred. Typically, the cause is an invalid input value.</p>
        capo_budgets.errors.not_found_exception.NotFoundException: <p>We can’t locate the resource that you specified.</p>
        capo_budgets.errors.throttling_exception.ThrottlingException: <p>The number of API requests has exceeded the maximum allowed API request throttling limit for the account.</p>
        capo_budgets.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_budgets.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[
        "capo_budgets.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_budgets._operations.aws_budget_service_gateway.untag_resource

        output, http_response = (
            capo_budgets._operations.aws_budget_service_gateway.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_budgets.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