Skip to content

untag_resource

untag_resource(
    resource_arn: Arn,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[AppFabricClientConfig] = None,
) -> UntagResourceResponse

Removes a tag or tags from a resource.

Parameters:

  • resource_arn (Arn) –

    The Amazon Resource Name (ARN) of the resource that you want to untag.

  • tag_keys (TagKeyList) –

    The keys of the key-value pairs for the tag or tags you want to remove from the specified resource.

Raises:

Source code in docs_src/capo_appfabric/_services/app_fabric.py
def untag_resource(
    self,
    resource_arn: "capo_appfabric.types.arn.Arn",
    tag_keys: "capo_appfabric.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AppFabricClientConfig] = None,
) -> "capo_appfabric.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes a tag or tags from a resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource that you want to untag.</p>
        tag_keys: <p>The keys of the key-value pairs for the tag or tags you want to remove from the specified resource.</p>

    Raises:
        capo_appfabric.errors.access_denied_exception.AccessDeniedException: <p>You are not authorized to perform this operation.</p>
        capo_appfabric.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure with an internal server.</p>
        capo_appfabric.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_appfabric.errors.throttling_exception.ThrottlingException: <p>The request rate exceeds the limit.</p>
        capo_appfabric.errors.validation_exception.ValidationException: <p>The request has invalid or missing parameters.</p>
        capo_appfabric.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_appfabric._operations.fabric_front_end_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_appfabric.types.untag_resource_request.UntagResourceRequest = {
        "resource_arn": resource_arn,
        "tag_keys": tag_keys,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output