public static Uri UploadPackageToBlob(IServiceManagement channel, string storageName, string subscriptionId, string packagePath) { StorageService storageService = null; storageService = channel.GetStorageKeys(subscriptionId, storageName); string storageKey = storageService.StorageServiceKeys.Primary; return(AzureBlob.UploadFile(storageName, storageKey, packagePath)); }
/// <summary> /// Removes uploaded package from storage account. /// </summary> /// <param name="channel">Channel to use for REST calls</param> /// <param name="storageName">Store which has the package</param> /// <param name="subscriptionId">Subscription which has the store</param> public static void RemovePackageFromBlob(IServiceManagement channel, string storageName, string subscriptionId) { StorageService storageService = null; storageService = channel.GetStorageKeys(subscriptionId, storageName); string storageKey = storageService.StorageServiceKeys.Primary; AzureBlob.RemoveFile(storageName, storageKey); }