Skip to content

untag_resource

untag_resource(
    resource_arn: fraudDetectorArn,
    tag_keys: tagKeyList,
    *,
    config_overrides: Optional[FraudDetectorClientConfig] = None,
) -> UntagResourceResult

Removes tags from a resource.

Parameters:

  • resource_arn (fraudDetectorArn) –

    The ARN of the resource from which to remove the tag.

  • tag_keys (tagKeyList) –

    The resource ARN.

Raises:

  • AccessDeniedException –

    An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as PutExternalModel, that specifies a role that is not in your account.

  • ResourceNotFoundException –

    An exception indicating the specified resource was not found.

  • ThrottlingException –

    An exception indicating a throttling error.

  • ValidationException –

    An exception indicating a specified value is not allowed.

  • UnknownServiceError –

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

Source code in docs_src/capo_frauddetector/_services/fraud_detector.py
def untag_resource(
    self,
    resource_arn: "capo_frauddetector.types.fraud_detector_arn.fraudDetectorArn",
    tag_keys: "capo_frauddetector.types.tag_key_list.tagKeyList",
    *,
    config_overrides: Optional[FraudDetectorClientConfig] = None,
) -> "capo_frauddetector.types.untag_resource_result.UntagResourceResult":
    """<p>Removes tags from a resource.</p>

    Args:
        resource_arn: <p>The ARN of the resource from which to remove the tag.</p>
        tag_keys: <p>The resource ARN.</p>

    Raises:
        capo_frauddetector.errors.access_denied_exception.AccessDeniedException: <p>An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as <code>PutExternalModel</code>, that specifies a role that is not in your account.</p>
        capo_frauddetector.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception indicating the specified resource was not found.</p>
        capo_frauddetector.errors.throttling_exception.ThrottlingException: <p>An exception indicating a throttling error.</p>
        capo_frauddetector.errors.validation_exception.ValidationException: <p>An exception indicating a specified value is not allowed.</p>
        capo_frauddetector.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_frauddetector.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[
        "capo_frauddetector.types.untag_resource_result.UntagResourceResult"
    ]:
        import capo_frauddetector._operations.aws_hawks_nest_service_facade.untag_resource

        output, http_response = (
            capo_frauddetector._operations.aws_hawks_nest_service_facade.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_frauddetector.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