-
Notifications
You must be signed in to change notification settings - Fork 4.1k
ServiceBus: Added properties to queue and subscription #5656
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
…lterEvaluationExceptions property to Subscriptions
cormacpayne
left a comment
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.
@v-Ajnava a couple of comments that need to be resolved. Also, please make sure to update your change log with an entry that reflects the changes being made in this PR.
| [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Enable Batched Operations - value that indicates whether server-side batched operations are enabled")] | ||
| [ValidateSet("TRUE", "FALSE", IgnoreCase = true)] | ||
| [ValidateNotNullOrEmpty] | ||
| public bool? EnableBatchedOperations { get; set; } |
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.
@v-Ajnava bool parameters are strongly discouraged in PowerShell -- please change this to be a SwitchParameter
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.
implemented SwitchParameter
| [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.")] | ||
| [ValidateSet("TRUE", "FALSE", IgnoreCase = true)] | ||
| [ValidateNotNullOrEmpty] | ||
| public bool? DeadLetteringOnFilterEvaluationExceptions { get; set; } |
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.
@v-Ajnava same comment about changing this to be a SwitchParameter
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.
implemented SwitchParameter
|
@cormacpayne have updated change log also. |
cormacpayne
left a comment
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.
@v-Ajnava a few additional comments to take a look at
|
|
||
| [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Enable Batched Operations - value that indicates whether server-side batched operations are enabled")] | ||
| [ValidateSet("TRUE", "FALSE", IgnoreCase = true)] | ||
| [ValidateNotNullOrEmpty] |
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.
@v-Ajnava please remove the ValueFromPipelineByPropertyName property, the ValidateSet attribute, and the ValidateNotNullOrEmpty attribute
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.
Resolved
|
|
||
| [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.")] | ||
| [ValidateSet("TRUE", "FALSE", IgnoreCase = true)] | ||
| [ValidateNotNullOrEmpty] |
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.
@v-Ajnava same comment about removing ValueFromPipelineByPropertyName, ValidateSet and ValidateNotNullOrEmpty
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.
Resolved
| [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Value that indicates whether a subscription has dead letter support on filter evaluation exceptions.")] | ||
| [ValidateSet("TRUE", "FALSE", IgnoreCase = true)] | ||
| [ValidateNotNullOrEmpty] | ||
| public SwitchParameter DeadLetteringOnFilterEvaluationExceptions { get; set; } |
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.
@v-Ajnava is there any way that we can shorten the length of this parameter name?
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.
property name it explains the purpose and shortening it will be not clear.
| $subName = getAssetName "Subscription-" | ||
|
|
||
|
|
||
| # $resltNewSub = New-AzureRmServiceBusSubscription -ResourceGroupName "RGName-970" -Namespace "Namespace-786" -Topic "topic-3510" -Name "TestingSub1" |
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.
@v-Ajnava please remove this if it's going to be commented out
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.
my bad, removed.
| $resultGetQueue.DeadLetteringOnMessageExpiration = $True | ||
| $resultGetQueue.MaxDeliveryCount = 5 | ||
| $resultGetQueue.MaxSizeInMegabytes = 1024 | ||
| $resultGetQueue.EnableBatchedOperations = $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.
@v-Ajnava are there any tests that cover the new switch parameters being used rather than the property being set on the object?
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.
its used to set the batchoperations service side. nothing no client side besides setting it.
| Type: SwitchParameter | ||
| Parameter Sets: (All) | ||
| Aliases: | ||
| Accepted values: TRUE, FALSE |
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.
@v-Ajnava make sure to regenerate the help for these two cmdlets after you remove the unnecessary properties on the parameters
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.
Done, the extra properties got removed when removed from cmd file.
| --- | ||
| external help file: Microsoft.Azure.Commands.ServiceBus.dll-Help.xml | ||
| Module Name: AzureRM.ServiceBus | ||
| online version: https://docs.microsoft.com/en-us/powershell/module/azurerm.servicebus/new-azurermservicebussubscription |
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.
@v-Ajnava please add this link back -- it may have been overridden during the generation of this file
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.
added back the online link
|
@cormacpayne we need this for the PS, we have customers asking for this property in PS and the code freeze for that is today. This property is already supported in other resources we have, it was just a bug that we did not have it for Queues. |
…nto SBProperties
Description
Added below optional properties :
Checklist
CONTRIBUTING.mdplatyPSmodule