/// <summary> Delete registry artifact by deleting its manifest. </summary> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception> public virtual Response Delete(CancellationToken cancellationToken = default) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RegistryArtifact)}.{nameof(Delete)}"); scope.Start(); try { string digest = GetDigest(cancellationToken); return(_restClient.DeleteManifest(_repositoryName, digest, cancellationToken)); } catch (Exception e) { scope.Failed(e); throw; } }