Skip to content

delete_project async

delete_project(
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    project_name: Optional[ProjectEntityName] = None,
) -> None

Delete the specified project.

Parameters:

Raises:

  • ConflictException –

    There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact.

  • UnknownServiceError –

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

Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
async def delete_project(
    self,
    *,
    config_overrides: Optional[AsyncSageMakerClientConfig] = None,
    project_name: Optional[
        "capo_sagemaker.types.project_entity_name.ProjectEntityName"
    ] = None,
) -> None:
    """<p>Delete the specified project.</p>

    Args:
        project_name: <p>The name of the project to delete.</p>

    Raises:
        capo_sagemaker.errors.conflict_exception.ConflictException: <p>There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> or <code>Artifact</code>.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sagemaker.types.delete_project_input.DeleteProjectInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_sagemaker._operations.sage_maker.delete_project

        (
            output,
            http_response,
        ) = await capo_sagemaker._operations.sage_maker.delete_project.async_delete_project(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteProject")
    )
    input_: capo_sagemaker.types.delete_project_input.DeleteProjectInput = {}
    if project_name is not None:
        input_["project_name"] = project_name

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output