Skip to content

delete_training_dataset

delete_training_dataset(
    training_dataset_arn: TrainingDatasetArn,
    *,
    config_overrides: Optional[CleanRoomsMLClientConfig] = None,
) -> None

Specifies a training dataset that you want to delete. You can't delete a training dataset if there are any audience models that depend on the training dataset. In Clean Rooms ML, the TrainingDataset is metadata that points to a Glue table, which is read only during AudienceModel creation. This action deletes the metadata.

Parameters:

  • training_dataset_arn (TrainingDatasetArn) –

    The Amazon Resource Name (ARN) of the training dataset that you want to delete.

Raises:

Source code in docs_src/capo_cleanroomsml/_services/clean_rooms_ml.py
def delete_training_dataset(
    self,
    training_dataset_arn: "capo_cleanroomsml.types.training_dataset_arn.TrainingDatasetArn",
    *,
    config_overrides: Optional[CleanRoomsMLClientConfig] = None,
) -> None:
    """<p>Specifies a training dataset that you want to delete. You can't delete a training dataset if there are any audience models that depend on the training dataset. In Clean Rooms ML, the <code>TrainingDataset</code> is metadata that points to a Glue table, which is read only during <code>AudienceModel</code> creation. This action deletes the metadata.</p>

    Args:
        training_dataset_arn: <p>The Amazon Resource Name (ARN) of the training dataset that you want to delete.</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_training_dataset_request.DeleteTrainingDatasetRequest]",
    ) -> OperationResponse[None]:
        import capo_cleanroomsml._operations.aws_stark_control_service.delete_training_dataset

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteTrainingDataset")
    )
    input_: capo_cleanroomsml.types.delete_training_dataset_request.DeleteTrainingDatasetRequest = {
        "training_dataset_arn": training_dataset_arn
    }

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