-
Notifications
You must be signed in to change notification settings - Fork 4k
[Az.RecoveryServices.Backup] Added suspend backup as MUA protected operation #27835
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -129,6 +129,9 @@ public RestAzureNS.AzureOperationResponse<ProtectedItemResource> SuspendBackup() | |||||
string resourceGroupName = (string)ProviderData[VaultParams.ResourceGroupName]; | ||||||
|
||||||
ItemBase itemBase = (ItemBase)ProviderData[ItemParams.Item]; | ||||||
|
||||||
string auxiliaryAccessToken = ProviderData.ContainsKey(ResourceGuardParams.Token) ? (string)ProviderData[ResourceGuardParams.Token] : null; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This initialization is duplicated from other providers. Consider refactoring into a shared helper method to reduce code duplication.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
bool isMUAProtected = true; | ||||||
|
||||||
// do validations | ||||||
ValidateAzureWorkloadDisableProtectionRequest(itemBase); | ||||||
|
@@ -152,7 +155,10 @@ public RestAzureNS.AzureOperationResponse<ProtectedItemResource> SuspendBackup() | |||||
protectedItemUri, | ||||||
serviceClientRequest, | ||||||
vaultName: vaultName, | ||||||
resourceGroupName: resourceGroupName); | ||||||
resourceGroupName: resourceGroupName, | ||||||
auxiliaryAccessToken, | ||||||
isMUAProtected, | ||||||
true); | ||||||
} | ||||||
|
||||||
public RestAzureNS.AzureOperationResponse<ProtectedItemResource> UndeleteProtection() | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -287,7 +287,10 @@ public RestAzureNS.AzureOperationResponse<ProtectedItemResource> SuspendBackup() | |||||||
string resourceGroupName = (string)ProviderData[VaultParams.ResourceGroupName]; | ||||||||
|
||||||||
ItemBase itemBase = (ItemBase)ProviderData[ItemParams.Item]; | ||||||||
|
||||||||
|
||||||||
string auxiliaryAccessToken = ProviderData.ContainsKey(ResourceGuardParams.Token) ? (string)ProviderData[ResourceGuardParams.Token] : null; | ||||||||
bool isMUAProtected = true; | ||||||||
Comment on lines
+291
to
+292
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This initialization of 'auxiliaryAccessToken' and the 'isMUAProtected' flag is duplicated across multiple providers. Consider refactoring into a shared helper to reduce code duplication.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||
|
||||||||
// do validations | ||||||||
ValidateAzureVMDisableProtectionRequest(itemBase); | ||||||||
|
||||||||
|
@@ -310,7 +313,10 @@ public RestAzureNS.AzureOperationResponse<ProtectedItemResource> SuspendBackup() | |||||||
protectedItemUri, | ||||||||
serviceClientRequest, | ||||||||
vaultName: vaultName, | ||||||||
resourceGroupName: resourceGroupName); | ||||||||
resourceGroupName: resourceGroupName, | ||||||||
auxiliaryAccessToken, | ||||||||
isMUAProtected, | ||||||||
true); | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Passing a positional boolean literal 'true' makes the argument’s intent unclear. Consider using a named argument or constant to clarify its purpose.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||
} | ||||||||
|
||||||||
/// <summary> | ||||||||
|
Uh oh!
There was an error while loading. Please reload this page.