Skip to content

untag_resource

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

Removes tags from resources.

Parameters:

  • resource_arn (ResourceArn) –

    The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon EMR Serverless applications and job runs.

  • tag_keys (TagKeyList) –

    The keys of the tags to be removed.

Raises:

Source code in docs_src/capo_emr_serverless/_services/emr_serverless.py
def untag_resource(
    self,
    resource_arn: "capo_emr_serverless.types.resource_arn.ResourceArn",
    tag_keys: "capo_emr_serverless.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[EMRServerlessClientConfig] = None,
) -> "capo_emr_serverless.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes tags from resources.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) that identifies the resource to list the tags for. Currently, the supported resources are Amazon EMR Serverless applications and job runs.</p>
        tag_keys: <p>The keys of the tags to be removed.</p>

    Raises:
        capo_emr_serverless.errors.internal_server_exception.InternalServerException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_emr_serverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_emr_serverless.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_emr_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_emr_serverless._operations.aws_toledo_web_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_emr_serverless.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