in python/pipelines/pipeline_ops.py [0:0]
def delete_pipeline_artefact_registry(
project_id: str,
region: str,
repo_name: str,
package_name: str) -> str:
"""
This function deletes a pipeline from the Artifact Registry.
Args:
project_id: The ID of the project that contains the pipeline.
region: The location of the pipeline.
repo_name: The name of the repository that contains the pipeline.
package_name: The name of the pipeline to delete.
Returns:
A string containing the response from the Artifact Registry.
Raises:
Exception: If an error occurs while deleting the pipeline.
"""
host = f"https://{region}-kfp.pkg.dev/{project_id}/{repo_name}"
client = RegistryClient(host=host)
response = client.delete_package(package_name=package_name)
logging.info(f"Pipeline deleted : {package_name}")
logging.info(response)
return response