Invalid URI: The format of the URI could not be determined.
See original GitHub issueLibrary name and version
Azure.ResourceManager.DataProtectionBackup 1.1.1
Query/Question
The error originates from DataSourceInfo.Serialization.cs(probably on Line#112 -
resourceUri = new Uri(property.Value.GetString());
)
Here is the code snippet that throws the exception -
`
var resourceId = DataProtectionBackupVaultResource.CreateResourceIdentifier(
_subscriptionId,
_resourceGroupName,
_vaultName);
var resource =
_armClient.GetDataProtectionBackupVaultResource(resourceId
);
var backupVault = await resource.GetAsync();
var backupInstancesCollection = backupVault.Value.GetDataProtectionBackupInstances().GetAllAsync();
`
Here is another code snippet that throws the same exception. `
var resourceId = DataProtectionBackupInstanceResource.CreateResourceIdentifier(
_subscriptionId,
_resourceGroupName,
_vaultName,
_backupInstanceName);
var resource =
_armClient.GetDataProtectionBackupInstanceResource(resourceId
);
var backupInstance = await resource.GetAsync();
` Both the snippets provided are trying to get a BackupInstanceResource object
Based on my research, the resourceUri property that gets returned in the REST api call is not a valid Uri. In the Azure portal it shows up like this. Added placeholders to show some confidential Ids.
"resourceUri": "/subscriptions/{subscriptionId}/resourceGroups/myRg/providers/Microsoft.Storage/storageAccounts/samplestorageaccount"
Environment
Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.2.5
Issue Analytics
- State:
- Created 5 months ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Hi @campionite , thank you for the feedback. We’ll apply a hotfix for this issue.
Azure.ResourceManager.DataProtectionBackup new package released.