/// <summary> Delete the tag. This removes the tag from the artifact and its manifest. </summary> /// <param name="tag"> The name of tag to delete. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> Thrown when <paramref name="tag"/> is null. </exception> /// <exception cref="ArgumentException"> Thrown when <paramref name="tag"/> is empty. </exception> /// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception> public virtual Response DeleteTag(string tag, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(tag, nameof(tag)); using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RegistryArtifact)}.{nameof(DeleteTag)}"); scope.Start(); try { return(_restClient.DeleteTag(_repositoryName, tag, cancellationToken)); } catch (Exception e) { scope.Failed(e); throw; } }