-
Notifications
You must be signed in to change notification settings - Fork 4k
Add cmdlets for managing Backend Entity in ApiManagement #3586
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
Conversation
New-AzureRmApiManagementBackend Get-AzureRmApiManagementBackend Set-AzureRmApiManagementBackend Remove-AzureRmApiManagementBackend
using System; | ||
using System.Management.Automation; | ||
|
||
[Cmdlet(VerbsCommon.New, Constants.ApiManagementBackend)] |
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 needs to support ShouldProcess
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.
public PsApiManagementBackendProxy Proxy { get; set; } | ||
|
||
[Parameter( | ||
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.
?? why from pipeline?
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.
[OutputType(typeof(PsApiManagementBackend))] | ||
public class SetAzureApiManagementBackend : AzureApiManagementCmdletBase | ||
{ | ||
[Parameter( |
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.
With this many named parameters, the strong suggestion is to add a new parameter set that that accepts a PSApiManagementBackEnd as one of the parameters, and use ValueFromPipeline there instead. This is not required, but it is a suggestion.
|
||
public override void ExecuteApiManagementCmdlet() | ||
{ | ||
Client.BackendSet( |
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.
Where is the SHouldProcess implementation?
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.
@@ -5894,7 +5894,7 @@ New-AzureRmApiManagementOperation –Context $apimContext –ApiId $apiId –Ope | |||
</ParamSets> | |||
<Syntax> |
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 is no longe rused for help, please remove. Instead, follow the instructions here: https://github.com/Azure/azure-powershell/blob/dev/documentation/platyPSHelp-documentation.md for creating and using the platyPS tool for markdown files.
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.
Generated documentation using platyPS for new cmdlets
using System; | ||
using System.Management.Automation; | ||
|
||
[Cmdlet(VerbsCommon.Set, Constants.ApiManagementBackend)] |
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.
needs to support SHoudlProcess
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.
"Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll","Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands.NewAzureApiManagementBackendProxy","New-AzureRmApiManagementBackendProxy","1","8100","New-AzureRmApiManagementBackendProxy Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" | ||
"Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll","Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands.NewAzureApiManagementBackendCredential","New-AzureRmApiManagementBackendCredential","1","8100","New-AzureRmApiManagementBackendCredential Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" | ||
"Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll","Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands.RemoveAzureApiManagementBackend","Remove-AzureRmApiManagementBackend","2","8210","Remove-AzureRmApiManagementBackend does not have a Force parameter but the cmdlet verb 'Remove' indicates that it may perform destructive actions under certain circumstances. Consider whether the cmdlet should have a Force parameter anduse ShouldContinue under some circumstances. ","Consider wether the cmdlet should have a Force parameter and use ShouldContinue under some circumstances. " | ||
"Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll","Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands.SetAzureApiManagementBackend","Set-AzureRmApiManagementBackend","1","8100","Set-AzureRmApiManagementBackend Does not support ShouldProcess but the cmdlet verb Set indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" |
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.
Set- needs to support SHouldProcess, as noted
On demand run 1428 |
Description
Add Cmdlets for Managing the Backend Entity in ApiManagement.
Below cmdlets only create In-Memory Object:
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