-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding identityBasedRestoreDetails optional property for the customer…
…s to be able to specify target storage account id when wanting to do restore using managed identities. (#15933)
- Loading branch information
1 parent
42185a2
commit 39fa4ce
Showing
6 changed files
with
254 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...2-20/examples/AzureIaasVm/TriggerCrossRegionRestore_IdentityBasedRestoreDetails_Post.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"azureRegion": "southeastasia", | ||
"api-version": "2018-12-20", | ||
"parameters": { | ||
"crossRegionRestoreAccessDetails": { | ||
"accessTokenString": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkhqaUJHdVExa2lWV2hyc2lzLUhEckhyWVZNbyJ9.eyJVc2VySWRlbnRpdHlUeXBlIjoiQUFEIiwiQWFkVGVuYW50SWQiOiIzM2UwMTkyMS00ZDY0LTRmOGMtYTA1NS01YmRhZmZkNWUzM2QiLCJBYWRTUE9iamVjdElkIjoiOTMzMjc2ZmMtMWJiNy00ZWNiLTk0ZTYtYWY3ODMyNWY3MjZhIiwiUmVzdG9yZVBvaW50UGVybWlzc2lvbnMiOiJSZWFkIiwiUmVzdG9yZVBvaW50SUQiOiJyZXNvdXJjZXMvMTMzMDgzNzkwNjQxODEzODE2MC9wcm90ZWN0aW9uQ29udGFpbmVycy8xMTE0Ni9wcm90ZWN0ZWRJdGVtcy8xMTQyOTM3MDMxL3JlY292ZXJ5UG9pbnRzLzg3MTc4MzU1MzkyNzE2IiwiaXNzIjoiaHR0cHM6Ly9SZWNvdmVyeVNlcnZpY2UiLCJhdWQiOiJodHRwczovL1JlY292ZXJ5U2VydmljZXMvUHJvdGVjdGlvblNlcnZpY2UiLCJleHAiOjE1NzExMjE5ODYsIm5iZiI6MTU3MTAzNTI4Nn0.oNbeX8ueE6JRGU0IagFjkOlU-o48ez9gCeCrn1-8XEsaVtYJIFKq9FeHfPAoCMxiLQvwL7S0JTjDTjiEsZEvr_VM7tDVwW3sESo2oW-SZlxT_1dJiUBn0jVlQyfDcHEMzbkaTuZswgNWfowgOrnJ67y-ztSUcegf3eVKPEhN1enBBS7pIuL9bZ3SVwMuqznUen6dH54y9lN2w6H14X0UK2CwSN94Uh-spB27j9SbksxLY_tyZm6xsamZFTHpwbgZwR24-GDtElPSxpFL6n_tWLSCHQtN9s84o0X7PfFaMkVmGWbOf4AZmP9M6agagG0JLnlOwObr07YrzZRkg3s2eQ", | ||
"backupManagementType": "AzureIaasVM", | ||
"containerName": "iaasvmcontainerv2;srinivasccyrg;sriniccylinux", | ||
"containerType": "IaasVMContainer", | ||
"coordinatorServiceStampUri": "https://pod01-coord1.ccy.backup.windowsazure.com", | ||
"datasourceContainerName": "iaasvmcontainerv2;srinivasccyrg;sriniccylinux", | ||
"datasourceId": "1142937031", | ||
"datasourceName": "sriniccylinux", | ||
"datasourceType": "VM", | ||
"protectionServiceStampId": "90d98224-2ac6-4bda-9f35-33fb22841f2a", | ||
"protectionServiceStampUri": "https://pod01-prot1-int.ccy.backup.windowsazure.com", | ||
"recoveryPointId": "87178355392716", | ||
"recoveryPointTime": "10/9/2019 6:05:54 PM", | ||
"resourceGroupName": "srinivasccyrg", | ||
"resourceId": "1330837906418138160", | ||
"resourceName": "sriniccyvault", | ||
"subscriptionId": "f2edfd5d-5496-4683-b94f-b3588c579009", | ||
"tokenExtendedInformation": "<IaaSVMRecoveryPointMetadataBase xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" i:type=\"IaaSVMRecoveryPointMetadata_V2015_09\" xmlns=\"http://windowscloudbackup.com/CloudCommon/V2011_09\"><MetadataVersion>V2015_09</MetadataVersion><ContainerType i:nil=\"true\" /><InstantRpGCId>f2edfd5d-5496-4683-b94f-b3588c579009;AzureBackup_sriniccylinux_1142937031;AzureBackup_20191009_060554;AzureBackupRG_centraluseuap_1</InstantRpGCId><IsBlockBlobEnabled>true</IsBlockBlobEnabled><IsManagedVirtualMachine>true</IsManagedVirtualMachine><OriginalSAOption>false</OriginalSAOption><OsType>Linux</OsType><ReadMetadaFromConfigBlob i:nil=\"true\" /><RecoveryPointConsistencyType>FileSystemConsistent</RecoveryPointConsistencyType><RpDiskDetails i:nil=\"true\" /><SourceIaaSVMRPKeyAndSecret i:nil=\"true\" /><SourceIaaSVMStorageType>PremiumVMOnPremiumStorage</SourceIaaSVMStorageType><VMSizeDescription>Standard_D2s_v3</VMSizeDescription></IaaSVMRecoveryPointMetadataBase>" | ||
}, | ||
"restoreRequest": { | ||
"affinityGroup": "", | ||
"createNewCloudService": false, | ||
"encryptionDetails": { | ||
"encryptionEnabled": false | ||
}, | ||
"identityInfo": { | ||
"isSystemAssignedIdentity": false, | ||
"managedIdentityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asmaskarRG1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asmaskartestmsi" | ||
}, | ||
"identityBasedRestoreDetails": { | ||
"targetStorageAccountId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00prjaiTestRg1/providers/Microsoft.Storage/storageAccounts/00prjaitestrg1disks993" | ||
}, | ||
"objectType": "IaasVMRestoreRequest", | ||
"originalStorageAccountOption": false, | ||
"recoveryPointId": "87178355392716", | ||
"recoveryType": "AlternateLocation", | ||
"region": "eastus2euap", | ||
"sourceResourceId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/srinivasccyrg/providers/Microsoft.Compute/virtualMachines/sriniccylinux", | ||
"subnetId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet/subnets/default", | ||
"targetDomainNameId": null, | ||
"targetResourceGroupId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl", | ||
"targetVirtualMachineId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAckl/providers/Microsoft.Compute/virtualMachines/gaallaVM", | ||
"virtualNetworkId": "/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/resourceGroups/00networkAcklVaultCCY/providers/Microsoft.Network/virtualNetworks/00networkAcklVaultCCY-vnet", | ||
"zones": [ | ||
"2" | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"202": { | ||
"headers": { | ||
"Location": "location: https://centraluseuap.management.azure.com/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/providers/microsoft.recoveryservices/locations/eastus2euap/backupCrrOperationResults/MTMzMDgzNzkwNjQxODEzODE2MDtkMTY3MzM3Yy0yM2I1LTQ5ODgtODkwZC0xY2MyMmQ5MTYyZjA=?api-version=2018-12-20-preview", | ||
"Azure-AsyncOperation": "azure-asyncoperation: https://centraluseuap.management.azure.com/subscriptions/f2edfd5d-5496-4683-b94f-b3588c579009/providers/microsoft.recoveryservices/locations/eastus2euap/backupCrrOperationsStatus/MTMzMDgzNzkwNjQxODEzODE2MDtkMTY3MzM3Yy0yM2I1LTQ5ODgtODkwZC0xY2MyMmQ5MTYyZjA=?api-version=2018-12-20-preview", | ||
"Retry-After": 60 | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...ples/AzureIaasVm/TriggerRestore_ALR_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "netsdktestrg", | ||
"vaultName": "testVault", | ||
"fabricName": "Azure", | ||
"containerName": "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1", | ||
"protectedItemName": "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1", | ||
"recoveryPointId": "348916168024334", | ||
"api-version": "2021-07-01", | ||
"parameters": { | ||
"properties": { | ||
"objectType": "IaasVMRestoreRequest", | ||
"recoveryPointId": "348916168024334", | ||
"recoveryType": "AlternateLocation", | ||
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1", | ||
"targetVirtualMachineId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg2/providers/Microsoft.Compute/virtualmachines/RSMDALRVM981435", | ||
"targetResourceGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg2", | ||
"virtualNetworkId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Network/virtualNetworks/testNet", | ||
"subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Network/virtualNetworks/testNet/subnets/default", | ||
"region": "southeastasia", | ||
"createNewCloudService": false, | ||
"originalStorageAccountOption": false, | ||
"encryptionDetails": { | ||
"encryptionEnabled": false | ||
}, | ||
"identityInfo": { | ||
"isSystemAssignedIdentity": true | ||
}, | ||
"identityBasedRestoreDetails": { | ||
"targetStorageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRg/providers/Microsoft.Storage/storageAccounts/testingAccount" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"202": { | ||
"headers": { | ||
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupFabrics/Azure/protectionContainers/iaasvmcontainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/vm;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/operationResults/00000000-0000-0000-0000-000000000000?api-version=2017-07-01", | ||
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupFabrics/Azure/protectionContainers/iaasvmcontainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/vm;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2017-07-01", | ||
"Retry-After": 60 | ||
} | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
...eIaasVm/TriggerRestore_RestoreDisks_IaasVMRestoreRequest_IdentityBasedRestoreDetails.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "netsdktestrg", | ||
"vaultName": "testVault", | ||
"fabricName": "Azure", | ||
"containerName": "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1", | ||
"protectedItemName": "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1", | ||
"recoveryPointId": "348916168024334", | ||
"api-version": "2021-07-01", | ||
"parameters": { | ||
"properties": { | ||
"objectType": "IaasVMRestoreRequest", | ||
"recoveryPointId": "348916168024334", | ||
"recoveryType": "RestoreDisks", | ||
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1", | ||
"region": "southeastasia", | ||
"createNewCloudService": true, | ||
"originalStorageAccountOption": false, | ||
"encryptionDetails": { | ||
"encryptionEnabled": false | ||
}, | ||
"identityInfo": { | ||
"isSystemAssignedIdentity": false, | ||
"managedIdentityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asmaskarRG1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asmaskartestmsi" | ||
}, | ||
"identityBasedRestoreDetails": { | ||
"targetStorageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testingRg/providers/Microsoft.Storage/storageAccounts/testAccount" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"202": { | ||
"headers": { | ||
"Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupFabrics/Azure/protectionContainers/iaasvmcontainer;iaasVMContainerV2;netsdktestrg;netvmtestv2vm1/protectedItems/vm;iaasVMContainerV2;netsdktestrg;netvmtestv2vm1/operationResults/00000000-0000-0000-0000-000000000000?api-version=2020-09-01", | ||
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.RecoveryServices/vaults/testVault/backupFabrics/Azure/protectionContainers/iaasvmcontainer;iaasVMContainerV2;netsdktestrg;netvmtestv2vm1/protectedItems/vm;iaasVMContainerV2;netsdktestrg;netvmtestv2vm1/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2020-09-01", | ||
"Retry-After": 60 | ||
} | ||
} | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
...07-01/examples/AzureIaasVm/ValidateOperation_RestoreDisk_IdentityBasedRestoreDetails.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "testRG", | ||
"vaultName": "testVault", | ||
"fabricName": "Azure", | ||
"containerName": "IaasVMContainer;iaasvmcontainerv2;testRG;testvmName", | ||
"protectedItemName": "VM;iaasvmcontainerv2;testRG;testvmName", | ||
"recoveryPointId": "348916168024334", | ||
"api-version": "2021-07-01", | ||
"parameters": { | ||
"objectType": "ValidateIaasVMRestoreOperationRequest", | ||
"restoreRequest": { | ||
"recoveryPointId": "348916168024334", | ||
"objectType": "IaasVMRestoreRequest", | ||
"recoveryType": "RestoreDisks", | ||
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1", | ||
"region": "southeastasia", | ||
"createNewCloudService": true, | ||
"originalStorageAccountOption": false, | ||
"encryptionDetails": { | ||
"encryptionEnabled": false | ||
}, | ||
"identityInfo": { | ||
"isSystemAssignedIdentity": false, | ||
"managedIdentityResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/asmaskarRG1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/asmaskartestmsi" | ||
}, | ||
"identityBasedRestoreDetails": { | ||
"targetStorageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testingRg/providers/Microsoft.Storage/storageAccounts/testAccount" | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"validateOperationResponse": { | ||
"validationResults": [ | ||
{ | ||
"code": "UserErrorCoreCountSubscriptionQuotaReached", | ||
"message": "Core Count subscription quota has been reached.", | ||
"recommendations": [ | ||
"Contact Azure support to increase the limits." | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |