-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
adding support for backing up and restoring of KeyVault secrets #3883
adding support for backing up and restoring of KeyVault secrets #3883
Conversation
revising KeyVault backup/restore cmdlets: adding support for pipelining allowing overwriting of dest file using session data store for file operations addressing CR feedback: using nameof, discarding redundant parameter set clauses more CR feedback addressing CR feedback: using nameof, discarding redundant parameter set clauses fix build break following merge CR feedback and fixing build breaks from merging changes adding support for backing up and restoring of KeyVault secrets addressing CR feedback: using nameof, discarding redundant parameter set clauses addressing CR feedback: using nameof, discarding redundant parameter set clauses
@dragav, |
Previous PR |
/// </summary> | ||
[Parameter( Mandatory = false, | ||
Position = 3, | ||
ValueFromPipelineByPropertyName = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not get its value from the pipeline at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the existing pattern. It looks like you're ok with the current shape of these changes, and so I'll address this with the next opportunity. I have another change in the .. pipeline (no pun intended) for the 5/10 release. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that is fine, this is not functionally significant
/// </summary> | ||
[Parameter( Mandatory = false, | ||
Position = 3, | ||
ValueFromPipelineByPropertyName = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not get value from pipeline at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same - ok to leave this for later change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update BrekingChangeIssues for any Breaking Changes in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, need to add breaking change suppressions for your change to BackupAzureKeyVaultKey
using KeyVaultProperties = Microsoft.Azure.Commands.KeyVault.Properties; | ||
|
||
namespace Microsoft.Azure.Commands.KeyVault | ||
{ | ||
/// <summary> | ||
/// Requests that a backup of the specified key be downloaded and stored to a file | ||
/// </summary> | ||
/// <remarks> | ||
/// The cmdlet returns the path of the newly created backup file. | ||
/// </remarks> | ||
[Cmdlet(VerbsData.Backup, "AzureKeyVaultKey", | ||
SupportsShouldProcess = true, | ||
HelpUri = Constants.KeyVaultHelpUri)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add a DefaultParameterSetName value, since you now have multiple parameter sets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
setting default parameters for Backup commands
@dragav you will need to take the contents of |
"Microsoft.Azure.Commands.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.BackupAzureKeyVaultKey","Backup-AzureKeyVaultKey","0","2100","The parameter 'VaultName' in cmdlet 'Backup-AzureKeyVaultKey' is no longer in the parameter set '__AllParameterSets'.","Add parameter 'VaultName' back to the parameter set '__AllParameterSets'." | ||
"Microsoft.Azure.Commands.KeyVault.dll","Microsoft.Azure.Commands.KeyVault.BackupAzureKeyVaultKey","Backup-AzureKeyVaultKey","0","2100","The parameter 'Name' in cmdlet 'Backup-AzureKeyVaultKey' is no longer in the parameter set '__AllParameterSets'.","Add parameter 'Name' back to the parameter set '__AllParameterSets'." | ||
"Microsoft.Azure.Commands.MachineLearning.dll","Microsoft.Azure.Commands.MachineLearning.UpdateAzureMLWebService","Update-AzureRmMlWebService","0","3040","The generic type argument for 'property Parameters' has been changed from 'System.String' to 'Microsoft.Azure.Management.MachineLearning.WebServices.Models.WebServiceParameter'.","Change the generic type argument for 'property Parameters' back to 'System.String'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This last entry is repeated, but we don't need to change it right now.
Removing duplicate value and extra lines
@azuresdkci test this please |
adding support for backing up and restoring of KeyVault secrets
revising KeyVault backup/restore cmdlets:
adding support for pipelining
allowing overwriting of dest file
using session data store for file operations
addressing CR feedback: using nameof, discarding redundant parameter set clauses
fix build break following merge
CR feedback and fixing build breaks from merging changes
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines