I have made progress. I figured out a method to delete media found in a vDC. It works, however I am getting an "Access is forbidden" message as the method loops through each media file. The file actually gets deleted, but exits out of the method because of the thrown error. Any help is appreciated. Code is below:
internal static void FindMediaInvDC(string vDCName)
{
try
{
Vdc vdc = FindVdc("MyOrg", vDCName);
List<ReferenceType> media = vdc.GetMediaRefs();
foreach (ResourceReferenceType mediaFile in media)
{
Console.WriteLine("Name: " + mediaFile.name + " - " + "HREF " + mediaFile.href);
Media.DeleteMedia(objConn.client, mediaFile);
}
}
catch (Exception ex)
{
throw new VCloudException(ex.Message);
}
}