-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response is System.Null Reference while Update_RegisterAzureStorageProtectionContainers #37904
Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist. |
Sure, Thank you |
I have uploaded source code in the https://github.com/pksouza23/POCfilesharebackup |
Is there any update on this issue? |
Hi @pksouza23 , we have repro you issue, working on a solution now. |
Hi @HarveyLink , Please let us know once it is fixed, we are waiting for the resolution. Thank you. |
Hi @HarveyLink , Any update on fix for the issue ? Thanks in advance. |
HI @HarveyLink @jsquire , Any progress on this issue? Thanks in advance. |
@pksouza23: Unfortunately, I do not have insight. We'll need an update from @HarveyLink or @ArthurMa1978. |
Hi @pksouza23 It's a service issue, we'll make a quick fix on the sdk to make it work first. Further fix would need service team's help. |
Hi @HarveyLink, Thanks for the response. Once quick fix applied on the SDK let us know. |
Also waiting for a resolution. Same issue with BackupProtectedItems PUT, @HarveyLink I don't know if you are aware of it. Any news on that would be grateful |
Hi @YariMVSage , @HarveyLink , If this is fixed, please let me know, if quick fix applied on the SDK. So that I can test the issue using updated SDK. Thanks, |
Opened issue to track the fix, have a PR now. Will let you know once we fixed that. |
Hi @HarveyLink Thanks!! |
Issue fix was meged, will have a release for that. I will keep you posted. |
Library name and version
Azure.ResourceManager.RecoveryServicesBackup 1.0.0
Describe the bug
I am registering storage container in the recovery service vault. But I am getting System Reference null error is throwing, storage container is successfully register. But problem is the response.
Expected behavior
Response should come properly without null reference issue.
Response should be included status 202 and location path.
HTTP/1.1 202 Accepted
'Pragma': 'no-cache'
'Expires': '-1'
'Location': ‘https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/ResourceGroups
/azurefiles/providers/Microsoft.RecoveryServices/vaults/azurefilesvault/backupFabrics/Azure/operationResults/
cca47745-12d2-42f9-b3a4-75335f18fdf6?api-version=2016-12-01’
'Retry-After': '60'
'X-Content-Type-Options': 'nosniff'
'x-ms-request-id': '6cc12ceb-90a2-430d-a1ec-9b6b6fdea92b'
'x-ms-client-request-id': ‘3da383a5-d66d-4b7c-982a-bc8d94798d61,3da383a5-d66d-4b7c-982a-bc8d94798d61’
'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
'X-Powered-By': 'ASP.NET'
'x-ms-ratelimit-remaining-subscription-reads': '11996'
'x-ms-correlation-request-id': '6cc12ceb-90a2-430d-a1ec-9b6b6fdea92b'
'x-ms-routing-request-id': CENTRALUSEUAP:20200203T091326Z:6cc12ceb-90a2-430d-a1ec-9b6b6fdea92b'
'Date': 'Mon, 03 Feb 2020 09:13:25 GMT'
Actual behavior
Reproduction Steps
https://learn.microsoft.com/en-us/rest/api/backup/protection-containers/register?tabs=dotnet
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.RecoveryServicesBackup;
using Azure.ResourceManager.RecoveryServicesBackup.Models;
using Azure.ResourceManager.Resources;
// Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/examples/AzureStorage/ProtectionContainers_Register.json
// this example is just showing the usage of "ProtectionContainers_Register" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BackupProtectionContainerResource created on azure
// for more information of creating BackupProtectionContainerResource, please refer to the document of BackupProtectionContainerResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "SwaggerTestRg";
string vaultName = "swaggertestvault";
string fabricName = "Azure";
string containerName = "StorageContainer;Storage;SwaggerTestRg;swaggertestsa";
ResourceIdentifier backupProtectionContainerResourceId = BackupProtectionContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, fabricName, containerName);
BackupProtectionContainerResource backupProtectionContainer = client.GetBackupProtectionContainerResource(backupProtectionContainerResourceId);
// invoke the operation
BackupProtectionContainerData data = new BackupProtectionContainerData(new AzureLocation("placeholder"))
{
Properties = new StorageContainer()
{
SourceResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/SwaggerTestRg/providers/Microsoft.Storage/storageAccounts/swaggertestsa"),
AcquireStorageAccountLock = AcquireStorageAccountLock.Acquire,
FriendlyName = "swaggertestsa",
BackupManagementType = BackupManagementType.AzureStorage,
},
};
ArmOperation lro = await backupProtectionContainer.UpdateAsync(WaitUntil.Completed, data); // has problem in response
BackupProtectionContainerResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BackupProtectionContainerData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
Environment
Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
Version 17.6.4
The text was updated successfully, but these errors were encountered: