Skip to content

delete_trained_model_output

delete_trained_model_output(
    trained_model_arn: TrainedModelArn,
    membership_identifier: UUID,
    *,
    config_overrides: Optional[CleanRoomsMLClientConfig] = None,
    version_identifier: Optional[UUID] = None,
) -> None

Deletes the model artifacts stored by the service.

Parameters:

  • trained_model_arn (TrainedModelArn) –

    The Amazon Resource Name (ARN) of the trained model whose output you want to delete.

  • membership_identifier (UUID) –

    The membership ID of the member that is deleting the trained model output.

  • version_identifier (Optional[UUID], default: None ) –

    The version identifier of the trained model to delete. If not specified, the operation will delete the base version of the trained model. When specified, only the particular version will be deleted.

Raises:

Source code in docs_src/capo_cleanroomsml/_services/clean_rooms_ml.py
def delete_trained_model_output(
    self,
    trained_model_arn: "capo_cleanroomsml.types.trained_model_arn.TrainedModelArn",
    membership_identifier: "capo_cleanroomsml.types.uuid.UUID",
    *,
    config_overrides: Optional[CleanRoomsMLClientConfig] = None,
    version_identifier: Optional["capo_cleanroomsml.types.uuid.UUID"] = None,
) -> None:
    """<p>Deletes the model artifacts stored by the service.</p>

    Args:
        trained_model_arn: <p>The Amazon Resource Name (ARN) of the trained model whose output you want to delete.</p>
        membership_identifier: <p>The membership ID of the member that is deleting the trained model output.</p>
        version_identifier: <p>The version identifier of the trained model to delete. If not specified, the operation will delete the base version of the trained model. When specified, only the particular version will be deleted.</p>

    Raises:
        capo_cleanroomsml.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_cleanroomsml.errors.conflict_exception.ConflictException: <p>You can't complete this action because another resource depends on this resource.</p>
        capo_cleanroomsml.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource you are requesting does not exist.</p>
        capo_cleanroomsml.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_cleanroomsml.errors.validation_exception.ValidationException: <p>The request parameters for this request are incorrect.</p>
        capo_cleanroomsml.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cleanroomsml.types.delete_trained_model_output_request.DeleteTrainedModelOutputRequest]",
    ) -> OperationResponse[None]:
        import capo_cleanroomsml._operations.aws_stark_control_service.delete_trained_model_output

        output, http_response = (
            capo_cleanroomsml._operations.aws_stark_control_service.delete_trained_model_output.delete_trained_model_output(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteTrainedModelOutput")
    )
    input_: capo_cleanroomsml.types.delete_trained_model_output_request.DeleteTrainedModelOutputRequest = {
        "trained_model_arn": trained_model_arn,
        "membership_identifier": membership_identifier,
    }
    if version_identifier is not None:
        input_["version_identifier"] = version_identifier

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