diff --git a/src/Cdn/Cdn.Autorest/custom/Get-AzCdnReadParameters.ps1 b/src/Cdn/Cdn.Autorest/custom/Get-AzCdnReadParameters.ps1 new file mode 100644 index 000000000000..ecd27902361b --- /dev/null +++ b/src/Cdn/Cdn.Autorest/custom/Get-AzCdnReadParameters.ps1 @@ -0,0 +1,30 @@ +function Get-AzCdnReadParameters { + [Microsoft.Azure.PowerShell.Cmdlets.Cdn.DoNotExportAttribute()] + [CmdletBinding()] + param( + [Parameter(Mandatory)] + [System.String] + ${CommandName}, + + [Parameter(Mandatory)] + [System.Collections.IDictionary] + ${BoundParameters} + ) + + $command = @(Get-Command -Name $CommandName -ErrorAction Stop)[0] + while ($command.CommandType -eq [System.Management.Automation.CommandTypes]::Alias) { + $command = Get-Command -Name $command.ResolvedCommandName -ErrorAction Stop + } + + $parameterNames = @($command.Parameters.Keys) + $parameterNames += @($command.Parameters.Values | ForEach-Object { $_.Aliases }) + + $readParameters = @{} + foreach ($parameter in $BoundParameters.GetEnumerator()) { + if ($parameter.Key -in $parameterNames) { + $readParameters[$parameter.Key] = $parameter.Value + } + } + + return $readParameters +} diff --git a/src/Cdn/Cdn.Autorest/custom/Remove-AzCdnProfile.ps1 b/src/Cdn/Cdn.Autorest/custom/Remove-AzCdnProfile.ps1 index 4f212a065d7a..e4968ac43a78 100644 --- a/src/Cdn/Cdn.Autorest/custom/Remove-AzCdnProfile.ps1 +++ b/src/Cdn/Cdn.Autorest/custom/Remove-AzCdnProfile.ps1 @@ -175,9 +175,11 @@ function Remove-AzCdnProfile { $hasPassThru = $PSBoundParameters.Remove('PassThru') if ($PSCmdlet.ParameterSetName -eq 'Delete') { - $cdnProfile = Get-AzCdnProfile @PSBoundParameters + $readParameters = Get-AzCdnReadParameters -CommandName 'Get-AzCdnProfile' -BoundParameters $PSBoundParameters + $cdnProfile = Get-AzCdnProfile @readParameters } elseif ($PSCmdlet.ParameterSetName -eq 'DeleteViaIdentity') { - $cdnProfile = Get-AzCdnProfile @PSBoundParameters + $readParameters = Get-AzCdnReadParameters -CommandName 'Get-AzCdnProfile' -BoundParameters $PSBoundParameters + $cdnProfile = Get-AzCdnProfile @readParameters } else { throw "Not supported ParameterSetName." } diff --git a/src/Cdn/Cdn.Autorest/custom/Remove-AzFrontDoorCdnProfile.ps1 b/src/Cdn/Cdn.Autorest/custom/Remove-AzFrontDoorCdnProfile.ps1 index 077d11bb2c39..77297a985a73 100644 --- a/src/Cdn/Cdn.Autorest/custom/Remove-AzFrontDoorCdnProfile.ps1 +++ b/src/Cdn/Cdn.Autorest/custom/Remove-AzFrontDoorCdnProfile.ps1 @@ -176,9 +176,11 @@ function Remove-AzFrontDoorCdnProfile { $hasPassThru = $PSBoundParameters.Remove('PassThru') if ($PSCmdlet.ParameterSetName -eq 'Delete') { - $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile @PSBoundParameters + $readParameters = Get-AzCdnReadParameters -CommandName 'Get-AzFrontDoorCdnProfile' -BoundParameters $PSBoundParameters + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile @readParameters } elseif ($PSCmdlet.ParameterSetName -eq 'DeleteViaIdentity') { - $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile @PSBoundParameters + $readParameters = Get-AzCdnReadParameters -CommandName 'Get-AzFrontDoorCdnProfile' -BoundParameters $PSBoundParameters + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile @readParameters } else { throw "Not supported ParameterSetName." } diff --git a/src/Cdn/Cdn.Autorest/custom/Update-AzCdnProfile.ps1 b/src/Cdn/Cdn.Autorest/custom/Update-AzCdnProfile.ps1 index e5496b364f7d..5d1c470b5a12 100644 --- a/src/Cdn/Cdn.Autorest/custom/Update-AzCdnProfile.ps1 +++ b/src/Cdn/Cdn.Autorest/custom/Update-AzCdnProfile.ps1 @@ -182,9 +182,11 @@ function Update-AzCdnProfile { $hasNoWait = $PSBoundParameters.Remove('NoWait') if ($PSCmdlet.ParameterSetName -eq 'UpdateExpanded') { - $cdnProfile = Get-AzCdnProfile @PSBoundParameters + $readParameters = Get-AzCdnReadParameters -CommandName 'Get-AzCdnProfile' -BoundParameters $PSBoundParameters + $cdnProfile = Get-AzCdnProfile @readParameters } elseif ($PSCmdlet.ParameterSetName -eq 'UpdateViaIdentityExpanded') { - $cdnProfile = Get-AzCdnProfile @PSBoundParameters + $readParameters = Get-AzCdnReadParameters -CommandName 'Get-AzCdnProfile' -BoundParameters $PSBoundParameters + $cdnProfile = Get-AzCdnProfile @readParameters } else { throw "Not supported ParameterSetName." } diff --git a/src/Cdn/Cdn.Autorest/custom/Update-AzFrontDoorCdnProfile.ps1 b/src/Cdn/Cdn.Autorest/custom/Update-AzFrontDoorCdnProfile.ps1 index 4ccf861db0ce..7138e416a62f 100644 --- a/src/Cdn/Cdn.Autorest/custom/Update-AzFrontDoorCdnProfile.ps1 +++ b/src/Cdn/Cdn.Autorest/custom/Update-AzFrontDoorCdnProfile.ps1 @@ -242,9 +242,11 @@ function Update-AzFrontDoorCdnProfile { $hasLogScrubbingState = $PSBoundParameters.Remove('LogScrubbingState') if ($PSCmdlet.ParameterSetName -eq 'UpdateExpanded') { - $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile @PSBoundParameters + $readParameters = Get-AzCdnReadParameters -CommandName 'Get-AzFrontDoorCdnProfile' -BoundParameters $PSBoundParameters + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile @readParameters } elseif ($PSCmdlet.ParameterSetName -eq 'UpdateViaIdentityExpanded') { - $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile @PSBoundParameters + $readParameters = Get-AzCdnReadParameters -CommandName 'Get-AzFrontDoorCdnProfile' -BoundParameters $PSBoundParameters + $frontDoorCdnProfile = Get-AzFrontDoorCdnProfile @readParameters } else { throw "Not supported ParameterSetName." } diff --git a/src/Cdn/Cdn.Autorest/generate-info.json b/src/Cdn/Cdn.Autorest/generate-info.json index e8d11f117004..a693bf8a040d 100644 --- a/src/Cdn/Cdn.Autorest/generate-info.json +++ b/src/Cdn/Cdn.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "39d7c1e4-7bfb-4e14-a49a-ba3e1c9354f5" + "generate_Id": "57914f66-0713-43e5-b23f-da61694bdbae" } diff --git a/src/Cdn/Cdn/ChangeLog.md b/src/Cdn/Cdn/ChangeLog.md index 13a5dbaf79c8..ef40f7f66c53 100644 --- a/src/Cdn/Cdn/ChangeLog.md +++ b/src/Cdn/Cdn/ChangeLog.md @@ -20,6 +20,7 @@ ## Upcoming Release +* Fixed Change Safety parameter forwarding in custom read-before-write cmdlets. * Documented the planned removal of standalone EdgeAction resource cmdlets in Az.Cdn 7.0.0 and Az 17.0.0 on November 15, 2026. This advance announcement did not change cmdlet behavior or add runtime warnings; EdgeAction delivery-rule actions and URL signing are not affected. * Added post-migration endpoint cutover guidance for Azure Front Door (classic) and Azure CDN from Microsoft (classic) migrations. @@ -159,4 +160,3 @@ Fixed enabling CDN custom domain HTTPS for Microsoft and Akamai SKU's ## Version 1.0.0 * General availability of `Az.Cdn` module - diff --git a/src/EventHub/EventHub.Autorest/custom/Add-AzEventHubBoundDynamicParameter.ps1 b/src/EventHub/EventHub.Autorest/custom/Add-AzEventHubBoundDynamicParameter.ps1 new file mode 100644 index 000000000000..8904f31c61ef --- /dev/null +++ b/src/EventHub/EventHub.Autorest/custom/Add-AzEventHubBoundDynamicParameter.ps1 @@ -0,0 +1,36 @@ +function Add-AzEventHubBoundDynamicParameter { + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotExportAttribute()] + [CmdletBinding()] + param( + [Parameter(Mandatory)] + [System.String] + ${CommandName}, + + [Parameter(Mandatory)] + [System.Collections.IDictionary] + ${BoundParameters}, + + [Parameter(Mandatory)] + [System.Collections.IDictionary] + ${TargetParameters}, + + [System.String[]] + ${ExcludedParameter} + ) + + $command = @(Get-Command -Name $CommandName -ErrorAction Stop)[0] + while ($command.CommandType -eq [System.Management.Automation.CommandTypes]::Alias) { + $command = Get-Command -Name $command.ResolvedCommandName -ErrorAction Stop + } + + if (-not [System.Management.Automation.IDynamicParameters].IsAssignableFrom($command.ImplementingType)) { + return + } + + $instance = [System.Activator]::CreateInstance($command.ImplementingType) + foreach ($parameterName in $instance.GetDynamicParameters().Keys) { + if (($parameterName -notin $ExcludedParameter) -and $BoundParameters.ContainsKey($parameterName)) { + $TargetParameters[$parameterName] = $BoundParameters[$parameterName] + } + } +} diff --git a/src/EventHub/EventHub.Autorest/custom/Approve-AzEventHubPrivateEndpointConnection.ps1 b/src/EventHub/EventHub.Autorest/custom/Approve-AzEventHubPrivateEndpointConnection.ps1 index 23aceb2100aa..022dfe62355e 100644 --- a/src/EventHub/EventHub.Autorest/custom/Approve-AzEventHubPrivateEndpointConnection.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Approve-AzEventHubPrivateEndpointConnection.ps1 @@ -139,8 +139,8 @@ function Approve-AzEventHubPrivateEndpointConnection{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $connection = Get-AzEventHubPrivateEndpointConnection @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHubPrivateEndpointConnection' -BoundParameters $PSBoundParameters + $connection = Get-AzEventHubPrivateEndpointConnection @readParameters $connection.ConnectionState = "Approved" if($hasDescription){ diff --git a/src/EventHub/EventHub.Autorest/custom/Deny-AzEventHubPrivateEndpointConnection.ps1 b/src/EventHub/EventHub.Autorest/custom/Deny-AzEventHubPrivateEndpointConnection.ps1 index b75b2a28e820..96fe18e27846 100644 --- a/src/EventHub/EventHub.Autorest/custom/Deny-AzEventHubPrivateEndpointConnection.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Deny-AzEventHubPrivateEndpointConnection.ps1 @@ -139,8 +139,8 @@ function Deny-AzEventHubPrivateEndpointConnection{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $connection = Get-AzEventHubPrivateEndpointConnection @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHubPrivateEndpointConnection' -BoundParameters $PSBoundParameters + $connection = Get-AzEventHubPrivateEndpointConnection @readParameters $connection.ConnectionState = "Rejected" if($hasDescription){ diff --git a/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubReadParameters.ps1 b/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubReadParameters.ps1 new file mode 100644 index 000000000000..9871b7a8b785 --- /dev/null +++ b/src/EventHub/EventHub.Autorest/custom/Get-AzEventHubReadParameters.ps1 @@ -0,0 +1,30 @@ +function Get-AzEventHubReadParameters { + [Microsoft.Azure.PowerShell.Cmdlets.EventHub.DoNotExportAttribute()] + [CmdletBinding()] + param( + [Parameter(Mandatory)] + [System.String] + ${CommandName}, + + [Parameter(Mandatory)] + [System.Collections.IDictionary] + ${BoundParameters} + ) + + $command = @(Get-Command -Name $CommandName -ErrorAction Stop)[0] + while ($command.CommandType -eq [System.Management.Automation.CommandTypes]::Alias) { + $command = Get-Command -Name $command.ResolvedCommandName -ErrorAction Stop + } + + $parameterNames = @($command.Parameters.Keys) + $parameterNames += @($command.Parameters.Values | ForEach-Object { $_.Aliases }) + + $readParameters = @{} + foreach ($parameter in $BoundParameters.GetEnumerator()) { + if ($parameter.Key -in $parameterNames) { + $readParameters[$parameter.Key] = $parameter.Value + } + } + + return $readParameters +} diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHub.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHub.ps1 index d6d80d465122..72b06b85f880 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHub.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHub.ps1 @@ -146,7 +146,7 @@ function Set-AzEventHub{ [System.String] # Resource id of the storage account to be used to create the blobs ${StorageAccountResourceId}, - + [Parameter(HelpMessage = "Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] @@ -257,8 +257,8 @@ function Set-AzEventHub{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $eventHub = Get-AzEventHub @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHub' -BoundParameters $PSBoundParameters + $eventHub = Get-AzEventHub @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubApplicationGroup.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubApplicationGroup.ps1 index 05f40fd6ceb8..9babf3ed5ca3 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubApplicationGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubApplicationGroup.ps1 @@ -73,7 +73,7 @@ function Set-AzEventHubApplicationGroup{ [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IApplicationGroupPolicy[]] # List of group policies that define the behavior of application group. The policies can support resource governance scenarios such as limiting ingress or egress traffic. ${Policy}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -146,7 +146,6 @@ function Set-AzEventHubApplicationGroup{ } process{ try{ - $hasIsEnabled = $PSBoundParameters.Remove('IsEnabled') $hasPolicy = $PSBoundParameters.Remove('Policy') $hasClientAppGroupIdentifier = $PSBoundParameters.Remove('ClientAppGroupIdentifier') @@ -154,8 +153,8 @@ function Set-AzEventHubApplicationGroup{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $appGroup = Get-AzEventHubApplicationGroup @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHubApplicationGroup' -BoundParameters $PSBoundParameters + $appGroup = Get-AzEventHubApplicationGroup @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubAuthorizationRule.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubAuthorizationRule.ps1 index 93347f0a95f7..6fe137c4c9fa 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubAuthorizationRule.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubAuthorizationRule.ps1 @@ -72,7 +72,7 @@ function Set-AzEventHubAuthorizationRule{ [System.String[]] # The rights associated with the rule. ${Rights}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -151,11 +151,13 @@ function Set-AzEventHubAuthorizationRule{ $null = $PSBoundParameters.Remove('Confirm') if ($PSCmdlet.ParameterSetName -eq 'SetExpandedNamespace'){ - $authRule = Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_Get @PSBoundParameters + $readParameters = Get-AzEventHubReadParameters -CommandName 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_Get' -BoundParameters $PSBoundParameters + $authRule = Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_Get @readParameters } - + elseif($PSCmdlet.ParameterSetName -eq 'SetExpandedEntity'){ - $authRule = Az.EventHub.private\Get-AzEventHubAuthorizationRule_Get @PSBoundParameters + $readParameters = Get-AzEventHubReadParameters -CommandName 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_Get' -BoundParameters $PSBoundParameters + $authRule = Az.EventHub.private\Get-AzEventHubAuthorizationRule_Get @readParameters } elseif ($PSCmdlet.ParameterSetName -eq 'SetViaIdentityExpanded'){ @@ -166,16 +168,18 @@ function Set-AzEventHubAuthorizationRule{ $ResourceHashTable = ParseResourceId -ResourceId $InputObject } if ($ResourceHashTable['EventHubName'] -ne $null){ - $authRule = Az.EventHub.private\Get-AzEventHubAuthorizationRule_GetViaIdentity @PSBoundParameters + $readParameters = Get-AzEventHubReadParameters -CommandName 'Az.EventHub.private\Get-AzEventHubAuthorizationRule_GetViaIdentity' -BoundParameters $PSBoundParameters + $authRule = Az.EventHub.private\Get-AzEventHubAuthorizationRule_GetViaIdentity @readParameters } elseif ($ResourceHashTable['NamespaceName'] -ne $null){ - $authRule = Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity @PSBoundParameters + $readParameters = Get-AzEventHubReadParameters -CommandName 'Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity' -BoundParameters $PSBoundParameters + $authRule = Az.EventHub.private\Get-AzEventHubNamespaceAuthorizationRule_GetViaIdentity @readParameters } else{ throw 'Invalid -InputObject. Please Check ResourceId' } } - + # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') @@ -203,9 +207,9 @@ function Set-AzEventHubAuthorizationRule{ } } - + elseif ($PSCmdlet.ParameterSetName -eq 'SetViaIdentityExpanded'){ - + if ($ResourceHashTable['EventHubName'] -ne $null){ if ($PSCmdlet.ShouldProcess("EventHub Entity Authorization Rule $($ResourceHashTable['AuthorizationRuleName'])", "Create or update")) { Az.EventHub.private\New-AzEventHubAuthorizationRule_CreateViaIdentity -InputObject $authRule -Parameter $authRule @PSBoundParameters diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubCluster.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubCluster.ps1 index a0407b3d9711..d3c5adb5312e 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubCluster.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubCluster.ps1 @@ -141,8 +141,8 @@ function Set-AzEventHubCluster{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $cluster = Get-AzEventHubCluster @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHubCluster' -BoundParameters $PSBoundParameters + $cluster = Get-AzEventHubCluster @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubConsumerGroup.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubConsumerGroup.ps1 index b16f6914d708..26debabdbe05 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubConsumerGroup.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubConsumerGroup.ps1 @@ -68,7 +68,7 @@ function Set-AzEventHubConsumerGroup{ [System.String] # User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored. ${UserMetadata}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -146,8 +146,8 @@ function Set-AzEventHubConsumerGroup{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $consumerGroup = Get-AzEventHubConsumerGroup @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHubConsumerGroup' -BoundParameters $PSBoundParameters + $consumerGroup = Get-AzEventHubConsumerGroup @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 index 6022a9369e14..17d30080b5eb 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubGeoDRConfigurationBreakPair.ps1 @@ -54,7 +54,7 @@ function Set-AzEventHubGeoDRConfigurationBreakPair{ # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -131,8 +131,8 @@ function Set-AzEventHubGeoDRConfigurationBreakPair{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $drConfig = Get-AzEventHubGeoDRConfiguration @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHubGeoDRConfiguration' -BoundParameters $PSBoundParameters + $drConfig = Get-AzEventHubGeoDRConfiguration @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') @@ -167,6 +167,8 @@ function Set-AzEventHubGeoDRConfigurationBreakPair{ $EnvPSBoundParameters['ProxyUseDefaultCredentials'] = $ProxyUseDefaultCredentials } + Add-AzEventHubBoundDynamicParameter -CommandName 'Az.EventHub.private\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_Break' -BoundParameters $PSBoundParameters -TargetParameters $EnvPSBoundParameters -ExcludedParameter InputObject, Name, NamespaceName, ResourceGroupName, SubscriptionId + if($InputObject.Id -ne $null){ $ResourceHashTable = ParseResourceId -ResourceId $InputObject.Id } diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubGeoDRConfigurationFailOver.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubGeoDRConfigurationFailOver.ps1 index 67e4ddadda4b..aeec7d03cd59 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubGeoDRConfigurationFailOver.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubGeoDRConfigurationFailOver.ps1 @@ -54,7 +54,7 @@ function Set-AzEventHubGeoDRConfigurationFailOver{ # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -131,8 +131,8 @@ function Set-AzEventHubGeoDRConfigurationFailOver{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $drConfig = Get-AzEventHubGeoDRConfiguration @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHubGeoDRConfiguration' -BoundParameters $PSBoundParameters + $drConfig = Get-AzEventHubGeoDRConfiguration @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') @@ -167,6 +167,8 @@ function Set-AzEventHubGeoDRConfigurationFailOver{ $EnvPSBoundParameters['ProxyUseDefaultCredentials'] = $ProxyUseDefaultCredentials } + Add-AzEventHubBoundDynamicParameter -CommandName 'Az.EventHub.private\Invoke-AzEventHubFailDisasterRecoveryConfigOver_Fail' -BoundParameters $PSBoundParameters -TargetParameters $EnvPSBoundParameters -ExcludedParameter InputObject, Name, NamespaceName, ResourceGroupName, SubscriptionId + if($InputObject.Id -ne $null){ $ResourceHashTable = ParseResourceId -ResourceId $InputObject.Id } diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNamespace.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNamespace.ps1 index d8d3d593808a..c0e71432c3ca 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNamespace.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNamespace.ps1 @@ -21,7 +21,7 @@ Updates an EventHub Namespace function Set-AzEventHubNamespace{ [Alias("Set-AzEventHubNamespaceV2")] - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.EventHub.Models.IEhNamespace])] [CmdletBinding(DefaultParameterSetName = 'SetExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( @@ -212,7 +212,7 @@ function Set-AzEventHubNamespace{ $hasEnableAutoInflate = $PSBoundParameters.Remove('EnableAutoInflate') $hasMaximumThroughputUnit = $PSBoundParameters.Remove('MaximumThroughputUnit') $hasMinimumTlsVersion = $PSBoundParameters.Remove('MinimumTlsVersion') - $hasRequireInfrastructureEncryption = $PSBoundParameters.Remove('RequireInfrastructureEncryption') + $hasRequireInfrastructureEncryption = $PSBoundParameters.Remove('RequireInfrastructureEncryption') $hasPublicNetworkAccess = $PSBoundParameters.Remove('PublicNetworkAccess') $hasSkuCapacity = $PSBoundParameters.Remove('SkuCapacity') $hasTag = $PSBoundParameters.Remove('Tag') @@ -223,8 +223,8 @@ function Set-AzEventHubNamespace{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $eventHubNamespace = Get-AzEventHubNamespace @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHubNamespace' -BoundParameters $PSBoundParameters + $eventHubNamespace = Get-AzEventHubNamespace @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNetworkRuleSet.ps1 b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNetworkRuleSet.ps1 index a1057f2af3fe..4aafff9b633d 100644 --- a/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNetworkRuleSet.ps1 +++ b/src/EventHub/EventHub.Autorest/custom/Set-AzEventHubNetworkRuleSet.ps1 @@ -53,7 +53,7 @@ function Set-AzEventHubNetworkRuleSet{ [Parameter(HelpMessage = "This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ")] [Microsoft.Azure.PowerShell.Cmdlets.EventHub.Category('Body')] [System.String] - #This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. + #This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ${PublicNetworkAccess}, [Parameter(HelpMessage = "Value that indicates whether Trusted Service Access is Enabled or not.")] @@ -161,8 +161,8 @@ function Set-AzEventHubNetworkRuleSet{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $networkRuleSet = Get-AzEventHubNetworkRuleSet @PSBoundParameters - + $readParameters = Get-AzEventHubReadParameters -CommandName 'Get-AzEventHubNetworkRuleSet' -BoundParameters $PSBoundParameters + $networkRuleSet = Get-AzEventHubNetworkRuleSet @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/EventHub/EventHub.Autorest/generate-info.json b/src/EventHub/EventHub.Autorest/generate-info.json index 1f4d0223bf71..26bbe5a4e62b 100644 --- a/src/EventHub/EventHub.Autorest/generate-info.json +++ b/src/EventHub/EventHub.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "37e57dcc-9680-41ff-a019-ec549669f7b0" + "generate_Id": "9240a33b-cdb2-4523-a6cc-096a195383eb" } diff --git a/src/EventHub/EventHub/ChangeLog.md b/src/EventHub/EventHub/ChangeLog.md index ec175fff137f..f56261f6eb43 100644 --- a/src/EventHub/EventHub/ChangeLog.md +++ b/src/EventHub/EventHub/ChangeLog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release * Added Change Safety support for additional cmdlets. +* Fixed Change Safety parameter forwarding in custom read-before-write and GeoDR cmdlets. ## Version 5.6.0 * Added parameter `IPAddressType` to cmdlets 'New-AzEventHubNamespace' and 'Set-AzEventHubNamespace' diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index d76afbf444de..26b79782a725 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -19,6 +19,7 @@ ---> ## Upcoming Release +* Fixed Change Safety parameter forwarding in custom read-before-write cmdlets. * Added provider-led ExpressRoute cross-connection migration commands to validate, inspect, prepare, migrate, commit, and roll back migrations, and shut down or restore BGP (Border Gateway Protocol). - Added `Invoke-AzExpressRouteCrossConnectionMigration` to invoke the migration action. - Added `New-AzExpressRouteCrossConnectionPortMapping` to construct source-to-target port mappings. Migration actions support confirmation, WhatIf, and background jobs. diff --git a/src/Network/NetworkSecurityPerimeter.Autorest/custom/Get-AzNetworkSecurityPerimeterReadParameters.ps1 b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Get-AzNetworkSecurityPerimeterReadParameters.ps1 new file mode 100644 index 000000000000..0e72e74dbfb8 --- /dev/null +++ b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Get-AzNetworkSecurityPerimeterReadParameters.ps1 @@ -0,0 +1,30 @@ +function Get-AzNetworkSecurityPerimeterReadParameters { + [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.DoNotExportAttribute()] + [CmdletBinding()] + param( + [Parameter(Mandatory)] + [System.String] + ${CommandName}, + + [Parameter(Mandatory)] + [System.Collections.IDictionary] + ${BoundParameters} + ) + + $command = @(Get-Command -Name $CommandName -ErrorAction Stop)[0] + while ($command.CommandType -eq [System.Management.Automation.CommandTypes]::Alias) { + $command = Get-Command -Name $command.ResolvedCommandName -ErrorAction Stop + } + + $parameterNames = @($command.Parameters.Keys) + $parameterNames += @($command.Parameters.Values | ForEach-Object { $_.Aliases }) + + $readParameters = @{} + foreach ($parameter in $BoundParameters.GetEnumerator()) { + if ($parameter.Key -in $parameterNames) { + $readParameters[$parameter.Key] = $parameter.Value + } + } + + return $readParameters +} diff --git a/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterAccessRule.ps1 b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterAccessRule.ps1 index 4ca2c9c9ad33..5318461046b5 100644 --- a/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterAccessRule.ps1 +++ b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterAccessRule.ps1 @@ -24,7 +24,7 @@ function Update-AzNetworkSecurityPerimeterAccessRule { [CmdletBinding(DefaultParameterSetName = 'UpdateExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( - #Runtime paramters + #Runtime paramters [Parameter(HelpMessage = "Run the command as a job")] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] @@ -79,7 +79,7 @@ function Update-AzNetworkSecurityPerimeterAccessRule { # Azure parameters - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -134,7 +134,7 @@ function Update-AzNetworkSecurityPerimeterAccessRule { # Body paramters - + [Parameter(HelpMessage = "Address Prefix")] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Body')] [System.String[]] @@ -199,7 +199,6 @@ function Update-AzNetworkSecurityPerimeterAccessRule { process { try { - # 1. GET # body params and AsJob @@ -215,13 +214,13 @@ function Update-AzNetworkSecurityPerimeterAccessRule { $null = $PSBoundParameters.Remove('Confirm') - $GETObject = Get-AzNetworkSecurityPerimeterAccessRule @PSBoundParameters - + $readParameters = Get-AzNetworkSecurityPerimeterReadParameters -CommandName 'Get-AzNetworkSecurityPerimeterAccessRule' -BoundParameters $PSBoundParameters + $GETObject = Get-AzNetworkSecurityPerimeterAccessRule @readParameters # 2. PUT $pathParams = 'InputObject', 'ResourceGroupName', 'Name', 'SubscriptionId', 'SecurityPerimeterName', 'ProfileName' - ForEach($pathParam in $pathParams){ + ForEach($pathParam in $pathParams){ $null = $PSBoundParameters.Remove($pathParam) } @@ -235,7 +234,7 @@ function Update-AzNetworkSecurityPerimeterAccessRule { $GETObject.$key = $variable } } - + # Call PUT method New-AzNetworkSecurityPerimeterAccessRule_CreateViaIdentity -InputObject $GETObject -Parameter $GETObject @PSBoundParameters diff --git a/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterAssociation.ps1 b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterAssociation.ps1 index 932f708dc6ac..435dbc8626a4 100644 --- a/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterAssociation.ps1 +++ b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterAssociation.ps1 @@ -24,7 +24,7 @@ function Update-AzNetworkSecurityPerimeterAssociation { [CmdletBinding(DefaultParameterSetName = 'UpdateExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( - #Runtime paramters + #Runtime paramters [Parameter(HelpMessage = "Run the command as a job")] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] @@ -168,7 +168,6 @@ function Update-AzNetworkSecurityPerimeterAssociation { process { try { - # 1. GET # body params and AsJob @@ -183,17 +182,16 @@ function Update-AzNetworkSecurityPerimeterAssociation { $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $GETObject = Get-AzNetworkSecurityPerimeterAssociation @PSBoundParameters - - + $readParameters = Get-AzNetworkSecurityPerimeterReadParameters -CommandName 'Get-AzNetworkSecurityPerimeterAssociation' -BoundParameters $PSBoundParameters + $GETObject = Get-AzNetworkSecurityPerimeterAssociation @readParameters # 2. PUT - + $pathParams = 'InputObject', 'ResourceGroupName', 'Name', 'SubscriptionId', 'SecurityPerimeterName' - ForEach($pathParam in $pathParams){ + ForEach($pathParam in $pathParams){ $null = $PSBoundParameters.Remove($pathParam) } - + foreach ($item in $bodyParamsMap.GetEnumerator() ) { if ($item.Value){ @@ -205,7 +203,7 @@ function Update-AzNetworkSecurityPerimeterAssociation { } } - + # Call PUT method Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterAssociation_CreateViaIdentity -InputObject $GETObject -Parameter $GETObject @PSBoundParameters diff --git a/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterLink.ps1 b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterLink.ps1 index 7a8267e7612d..ff4dd68370c9 100644 --- a/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterLink.ps1 +++ b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterLink.ps1 @@ -24,7 +24,7 @@ function Update-AzNetworkSecurityPerimeterLink { [CmdletBinding(DefaultParameterSetName = 'UpdateExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( - #Runtime paramters + #Runtime paramters [Parameter(HelpMessage = "Run the command as a job")] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] @@ -169,7 +169,6 @@ function Update-AzNetworkSecurityPerimeterLink { process { try { - # 1. GET # body params and AsJob @@ -184,17 +183,16 @@ function Update-AzNetworkSecurityPerimeterLink { $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $GETObject = Get-AzNetworkSecurityPerimeterLink @PSBoundParameters - - + $readParameters = Get-AzNetworkSecurityPerimeterReadParameters -CommandName 'Get-AzNetworkSecurityPerimeterLink' -BoundParameters $PSBoundParameters + $GETObject = Get-AzNetworkSecurityPerimeterLink @readParameters # 2. PUT - + $pathParams = 'InputObject', 'ResourceGroupName', 'Name', 'SubscriptionId', 'SecurityPerimeterName' - ForEach($pathParam in $pathParams){ + ForEach($pathParam in $pathParams){ $null = $PSBoundParameters.Remove($pathParam) } - + foreach ($item in $bodyParamsMap.GetEnumerator() ) { if ($item.Value){ @@ -206,7 +204,7 @@ function Update-AzNetworkSecurityPerimeterLink { } } - + # Call PUT method Az.NetworkSecurityPerimeter.private\New-AzNetworkSecurityPerimeterLink_CreateViaIdentity -InputObject $GETObject -Parameter $GETObject @PSBoundParameters diff --git a/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterLoggingConfiguration.ps1 b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterLoggingConfiguration.ps1 index 5cb73685d18c..58df42f1eaf3 100644 --- a/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterLoggingConfiguration.ps1 +++ b/src/Network/NetworkSecurityPerimeter.Autorest/custom/Update-AzNetworkSecurityPerimeterLoggingConfiguration.ps1 @@ -24,7 +24,7 @@ function Update-AzNetworkSecurityPerimeterLoggingConfiguration { [CmdletBinding(DefaultParameterSetName = 'UpdateExpanded', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] param( - #Runtime paramters + #Runtime paramters [Parameter(HelpMessage = "Run the command as a job")] [Microsoft.Azure.PowerShell.Cmdlets.NetworkSecurityPerimeter.Category('Runtime')] @@ -157,7 +157,6 @@ function Update-AzNetworkSecurityPerimeterLoggingConfiguration { process { try { - # 1. GET # body params and AsJob @@ -172,16 +171,16 @@ function Update-AzNetworkSecurityPerimeterLoggingConfiguration { $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $GETObject = Get-AzNetworkSecurityPerimeterLoggingConfiguration @PSBoundParameters - + $readParameters = Get-AzNetworkSecurityPerimeterReadParameters -CommandName 'Get-AzNetworkSecurityPerimeterLoggingConfiguration' -BoundParameters $PSBoundParameters + $GETObject = Get-AzNetworkSecurityPerimeterLoggingConfiguration @readParameters # 2. PUT - + $pathParams = 'InputObject', 'ResourceGroupName', 'Name', 'SubscriptionId', 'SecurityPerimeterName' - ForEach($pathParam in $pathParams){ + ForEach($pathParam in $pathParams){ $null = $PSBoundParameters.Remove($pathParam) } - + foreach ($item in $bodyParamsMap.GetEnumerator() ) { if ($item.Value){ @@ -193,7 +192,7 @@ function Update-AzNetworkSecurityPerimeterLoggingConfiguration { } } - + # Call PUT method New-AzNetworkSecurityPerimeterLoggingConfiguration_CreateViaIdentity -InputObject $GETObject -Parameter $GETObject @PSBoundParameters diff --git a/src/Network/NetworkSecurityPerimeter.Autorest/generate-info.json b/src/Network/NetworkSecurityPerimeter.Autorest/generate-info.json index 5d7d984d980b..2e7d749b7c6a 100644 --- a/src/Network/NetworkSecurityPerimeter.Autorest/generate-info.json +++ b/src/Network/NetworkSecurityPerimeter.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "046fadd9-469a-4fab-b916-8f35b9238eeb" + "generate_Id": "654ba71e-af6b-44b7-9aed-5d9b9443e9af" } diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Add-AzServiceBusBoundDynamicParameter.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Add-AzServiceBusBoundDynamicParameter.ps1 new file mode 100644 index 000000000000..f0c6061c286f --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Add-AzServiceBusBoundDynamicParameter.ps1 @@ -0,0 +1,36 @@ +function Add-AzServiceBusBoundDynamicParameter { + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotExportAttribute()] + [CmdletBinding()] + param( + [Parameter(Mandatory)] + [System.String] + ${CommandName}, + + [Parameter(Mandatory)] + [System.Collections.IDictionary] + ${BoundParameters}, + + [Parameter(Mandatory)] + [System.Collections.IDictionary] + ${TargetParameters}, + + [System.String[]] + ${ExcludedParameter} + ) + + $command = @(Get-Command -Name $CommandName -ErrorAction Stop)[0] + while ($command.CommandType -eq [System.Management.Automation.CommandTypes]::Alias) { + $command = Get-Command -Name $command.ResolvedCommandName -ErrorAction Stop + } + + if (-not [System.Management.Automation.IDynamicParameters].IsAssignableFrom($command.ImplementingType)) { + return + } + + $instance = [System.Activator]::CreateInstance($command.ImplementingType) + foreach ($parameterName in $instance.GetDynamicParameters().Keys) { + if (($parameterName -notin $ExcludedParameter) -and $BoundParameters.ContainsKey($parameterName)) { + $TargetParameters[$parameterName] = $BoundParameters[$parameterName] + } + } +} diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Approve-AzServiceBusPrivateEndpointConnection.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Approve-AzServiceBusPrivateEndpointConnection.ps1 index ed53fbfa22d5..2c55e483ecba 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Approve-AzServiceBusPrivateEndpointConnection.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Approve-AzServiceBusPrivateEndpointConnection.ps1 @@ -140,8 +140,8 @@ function Approve-AzServiceBusPrivateEndpointConnection{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $connection = Get-AzServiceBusPrivateEndpointConnection @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusPrivateEndpointConnection' -BoundParameters $PSBoundParameters + $connection = Get-AzServiceBusPrivateEndpointConnection @readParameters $connection.ConnectionState = "Approved" if($hasDescription){ diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Deny-AzServiceBusPrivateEndpointConnection.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Deny-AzServiceBusPrivateEndpointConnection.ps1 index 5185cfd5a66b..aecd45326fe6 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Deny-AzServiceBusPrivateEndpointConnection.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Deny-AzServiceBusPrivateEndpointConnection.ps1 @@ -140,8 +140,8 @@ function Deny-AzServiceBusPrivateEndpointConnection{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $connection = Get-AzServiceBusPrivateEndpointConnection @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusPrivateEndpointConnection' -BoundParameters $PSBoundParameters + $connection = Get-AzServiceBusPrivateEndpointConnection @readParameters $connection.ConnectionState = "Rejected" if($hasDescription){ diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusReadParameters.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusReadParameters.ps1 new file mode 100644 index 000000000000..c20e1b408096 --- /dev/null +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Get-AzServiceBusReadParameters.ps1 @@ -0,0 +1,30 @@ +function Get-AzServiceBusReadParameters { + [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.DoNotExportAttribute()] + [CmdletBinding()] + param( + [Parameter(Mandatory)] + [System.String] + ${CommandName}, + + [Parameter(Mandatory)] + [System.Collections.IDictionary] + ${BoundParameters} + ) + + $command = @(Get-Command -Name $CommandName -ErrorAction Stop)[0] + while ($command.CommandType -eq [System.Management.Automation.CommandTypes]::Alias) { + $command = Get-Command -Name $command.ResolvedCommandName -ErrorAction Stop + } + + $parameterNames = @($command.Parameters.Keys) + $parameterNames += @($command.Parameters.Values | ForEach-Object { $_.Aliases }) + + $readParameters = @{} + foreach ($parameter in $BoundParameters.GetEnumerator()) { + if ($parameter.Key -in $parameterNames) { + $readParameters[$parameter.Key] = $parameter.Value + } + } + + return $readParameters +} diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusAuthorizationRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusAuthorizationRule.ps1 index e1ac93e4b549..2002da26ccd8 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusAuthorizationRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusAuthorizationRule.ps1 @@ -82,7 +82,7 @@ function Set-AzServiceBusAuthorizationRule{ [System.String[]] # The rights associated with the rule. ${Rights}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -161,15 +161,18 @@ function Set-AzServiceBusAuthorizationRule{ $null = $PSBoundParameters.Remove('Confirm') if ($PSCmdlet.ParameterSetName -eq 'SetExpandedQueue'){ - $authRule = Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_Get @PSBoundParameters + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_Get' -BoundParameters $PSBoundParameters + $authRule = Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_Get @readParameters } elseif ($PSCmdlet.ParameterSetName -eq 'SetExpandedTopic'){ - $authRule = Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_Get @PSBoundParameters + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_Get' -BoundParameters $PSBoundParameters + $authRule = Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_Get @readParameters } elseif ($PSCmdlet.ParameterSetName -eq 'SetExpandedNamespace'){ - $authRule = Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_Get @PSBoundParameters + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_Get' -BoundParameters $PSBoundParameters + $authRule = Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_Get @readParameters } if ($hasAsJob) { @@ -177,7 +180,7 @@ function Set-AzServiceBusAuthorizationRule{ } elseif ($PSCmdlet.ParameterSetName -eq 'SetViaIdentityExpanded'){ - + if($InputObject.Id -ne $null){ $ResourceHashTable = ParseResourceId -ResourceId $InputObject.Id } @@ -186,20 +189,23 @@ function Set-AzServiceBusAuthorizationRule{ } if ($ResourceHashTable['QueueName'] -ne $null){ - $authRule = Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity @PSBoundParameters + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity' -BoundParameters $PSBoundParameters + $authRule = Az.ServiceBus.private\Get-AzServiceBusQueueAuthorizationRule_GetViaIdentity @readParameters } elseif ($ResourceHashTable['TopicName'] -ne $null){ - $authRule = Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity @PSBoundParameters + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity' -BoundParameters $PSBoundParameters + $authRule = Az.ServiceBus.private\Get-AzServiceBusTopicAuthorizationRule_GetViaIdentity @readParameters } elseif ($ResourceHashTable['NamespaceName'] -ne $null){ - $authRule = Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity @PSBoundParameters + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity' -BoundParameters $PSBoundParameters + $authRule = Az.ServiceBus.private\Get-AzServiceBusNamespaceAuthorizationRule_GetViaIdentity @readParameters } else{ throw 'Invalid -InputObject. Please Check ResourceId' } } - + # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') @@ -235,7 +241,7 @@ function Set-AzServiceBusAuthorizationRule{ } elseif ($PSCmdlet.ParameterSetName -eq 'SetViaIdentityExpanded'){ - + if ($ResourceHashTable['QueueName'] -ne $null){ if ($PSCmdlet.ShouldProcess("ServiceBus Queue Authorization Rule $($ResourceHashTable['AuthorizationRuleName'])", "Create or update")) { Az.ServiceBus.private\New-AzServiceBusQueueAuthorizationRule_CreateViaIdentity -InputObject $authRule -Parameter $authRule @PSBoundParameters diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusGeoDRConfigurationBreakPair.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusGeoDRConfigurationBreakPair.ps1 index 1ad47e981f25..a2d52f8b516a 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusGeoDRConfigurationBreakPair.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusGeoDRConfigurationBreakPair.ps1 @@ -55,7 +55,7 @@ function Set-AzServiceBusGeoDRConfigurationBreakPair{ # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -132,8 +132,8 @@ function Set-AzServiceBusGeoDRConfigurationBreakPair{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $drConfig = Get-AzServiceBusGeoDRConfiguration @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusGeoDRConfiguration' -BoundParameters $PSBoundParameters + $drConfig = Get-AzServiceBusGeoDRConfiguration @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') @@ -168,6 +168,8 @@ function Set-AzServiceBusGeoDRConfigurationBreakPair{ $EnvPSBoundParameters['ProxyUseDefaultCredentials'] = $ProxyUseDefaultCredentials } + Add-AzServiceBusBoundDynamicParameter -CommandName 'Az.ServiceBus.private\Invoke-AzServiceBusBreakDisasterRecoveryConfigPairing_Break' -BoundParameters $PSBoundParameters -TargetParameters $EnvPSBoundParameters -ExcludedParameter InputObject, Name, NamespaceName, ResourceGroupName, SubscriptionId + if($InputObject.Id -ne $null){ $ResourceHashTable = ParseResourceId -ResourceId $InputObject.Id } diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusGeoDRConfigurationFailOver.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusGeoDRConfigurationFailOver.ps1 index d2fff87db5ea..9b9f2a51a521 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusGeoDRConfigurationFailOver.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusGeoDRConfigurationFailOver.ps1 @@ -55,7 +55,7 @@ function Set-AzServiceBusGeoDRConfigurationFailOver{ # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${InputObject}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -132,8 +132,8 @@ function Set-AzServiceBusGeoDRConfigurationFailOver{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $drConfig = Get-AzServiceBusGeoDRConfiguration @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusGeoDRConfiguration' -BoundParameters $PSBoundParameters + $drConfig = Get-AzServiceBusGeoDRConfiguration @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') @@ -168,6 +168,8 @@ function Set-AzServiceBusGeoDRConfigurationFailOver{ $EnvPSBoundParameters['ProxyUseDefaultCredentials'] = $ProxyUseDefaultCredentials } + Add-AzServiceBusBoundDynamicParameter -CommandName 'Az.ServiceBus.private\Invoke-AzServiceBusFailDisasterRecoveryConfigOver_FailExpanded' -BoundParameters $PSBoundParameters -TargetParameters $EnvPSBoundParameters -ExcludedParameter InputObject, Name, NamespaceName, ResourceGroupName, SubscriptionId + if ($InputObject.Id -ne $null){ $ResourceHashTable = ParseResourceId -ResourceId $InputObject.Id } diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNamespace.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNamespace.ps1 index 099a480c5413..50f1aabe7778 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNamespace.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNamespace.ps1 @@ -52,12 +52,12 @@ function Set-AzServiceBusNamespace{ [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] ${AlternateName}, - + [Parameter(HelpMessage = "This property disables SAS authentication for the Service Bus namespace.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] ${DisableLocalAuth}, - + [Parameter(HelpMessage = "Properties of KeyVault")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.IKeyVaultProperties[]] @@ -211,8 +211,8 @@ function Set-AzServiceBusNamespace{ $hasNoWait = $PSBoundParameters.Remove('NoWait') $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $serviceBusNamespace = Get-AzServiceBusNamespace @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusNamespace' -BoundParameters $PSBoundParameters + $serviceBusNamespace = Get-AzServiceBusNamespace @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') @@ -238,11 +238,11 @@ function Set-AzServiceBusNamespace{ } if ($hasUserAssignedIdentityId) { $identityHashTable = @{} - + foreach ($resourceID in $UserAssignedIdentityId){ $identityHashTable.Add($resourceID, [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Models.UserAssignedIdentity]::new()) } - + $serviceBusNamespace.UserAssignedIdentity = $identityHashTable } if ($hasMinimumTlsVersion) { diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNetworkRuleSet.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNetworkRuleSet.ps1 index d6149a80ee4b..01b29625820c 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNetworkRuleSet.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusNetworkRuleSet.ps1 @@ -53,7 +53,7 @@ function Set-AzServiceBusNetworkRuleSet{ [Parameter(HelpMessage = "This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] - # This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. + # This determines if traffic is allowed over public network. By default it is enabled. If value is SecuredByPerimeter then Inbound and Outbound communication is controlled by the network security perimeter and profile's access rules. ${PublicNetworkAccess}, [Parameter(HelpMessage = "Value that indicates whether Trusted Service Access is Enabled or not.")] @@ -161,8 +161,8 @@ function Set-AzServiceBusNetworkRuleSet{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $networkRuleSet = Get-AzServiceBusNetworkRuleSet @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusNetworkRuleSet' -BoundParameters $PSBoundParameters + $networkRuleSet = Get-AzServiceBusNetworkRuleSet @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusQueue.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusQueue.ps1 index 5f272f40c85b..904aea5d8b9b 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusQueue.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusQueue.ps1 @@ -134,7 +134,7 @@ function Set-AzServiceBusQueue{ [System.String] ${Status}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -230,8 +230,8 @@ function Set-AzServiceBusQueue{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $queue = Get-AzServiceBusQueue @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusQueue' -BoundParameters $PSBoundParameters + $queue = Get-AzServiceBusQueue @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusRule.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusRule.ps1 index c49359ddcc31..7943256bff61 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusRule.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusRule.ps1 @@ -150,7 +150,7 @@ function Set-AzServiceBusRule{ [Parameter(HelpMessage = "Value that indicates whether the rule action requires preprocessing.")] [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.Management.Automation.SwitchParameter] - # Value that indicates whether the rule action requires preprocessing. + # Value that indicates whether the rule action requires preprocessing. ${ActionRequiresPreprocessing}, [Parameter(HelpMessage = "SQL expression. e.g. MyProperty='ABC'")] @@ -247,8 +247,8 @@ function Set-AzServiceBusRule{ $hasActionSqlExpression = $PSBoundParameters.Remove('ActionSqlExpression') $hasActionRequiresPreprocessing = $PSBoundParameters.Remove('ActionRequiresPreprocessing') - $rule = Get-AzServiceBusRule @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusRule' -BoundParameters $PSBoundParameters + $rule = Get-AzServiceBusRule @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusSubscription.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusSubscription.ps1 index 002b255c030b..8e8898e380c4 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusSubscription.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusSubscription.ps1 @@ -128,7 +128,7 @@ function Set-AzServiceBusSubscription{ [System.Management.Automation.SwitchParameter] # Value that indicates whether a subscription has dead letter support on filter evaluation exceptions. ${DeadLetteringOnMessageExpiration}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -217,8 +217,8 @@ function Set-AzServiceBusSubscription{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $subscription = Get-AzServiceBusSubscription @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusSubscription' -BoundParameters $PSBoundParameters + $subscription = Get-AzServiceBusSubscription @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusTopic.ps1 b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusTopic.ps1 index 9c55e7a90caf..76a372437e03 100644 --- a/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusTopic.ps1 +++ b/src/ServiceBus/ServiceBus.Autorest/custom/Set-AzServiceBusTopic.ps1 @@ -109,7 +109,7 @@ function Set-AzServiceBusTopic{ [Microsoft.Azure.PowerShell.Cmdlets.ServiceBus.Category('Body')] [System.String] ${Status}, - + [Parameter(HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -202,8 +202,8 @@ function Set-AzServiceBusTopic{ $null = $PSBoundParameters.Remove('WhatIf') $null = $PSBoundParameters.Remove('Confirm') - $topic = Get-AzServiceBusTopic @PSBoundParameters - + $readParameters = Get-AzServiceBusReadParameters -CommandName 'Get-AzServiceBusTopic' -BoundParameters $PSBoundParameters + $topic = Get-AzServiceBusTopic @readParameters # 2. PUT $null = $PSBoundParameters.Remove('InputObject') $null = $PSBoundParameters.Remove('ResourceGroupName') diff --git a/src/ServiceBus/ServiceBus.Autorest/generate-info.json b/src/ServiceBus/ServiceBus.Autorest/generate-info.json index 14c5740cefa9..51d5d25d45e9 100644 --- a/src/ServiceBus/ServiceBus.Autorest/generate-info.json +++ b/src/ServiceBus/ServiceBus.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "d42664e3-3ae4-4daf-a410-fba6f9958c4e" + "generate_Id": "522c1679-6822-4201-80a6-7fa4965c2384" } diff --git a/src/ServiceBus/ServiceBus/ChangeLog.md b/src/ServiceBus/ServiceBus/ChangeLog.md index e1c240079d4e..9d7a5954d19e 100644 --- a/src/ServiceBus/ServiceBus/ChangeLog.md +++ b/src/ServiceBus/ServiceBus/ChangeLog.md @@ -20,6 +20,7 @@ --> ## Upcoming Release * Added Change Safety support for additional cmdlets. +* Fixed Change Safety parameter forwarding in custom read-before-write and GeoDR cmdlets. ## Version 4.3.0 * Added parameters 'GeoDataReplicationMaxReplicationLagDurationInSecond', 'GeoDataReplicationLocation', and 'IPAddressType' to cmdlets 'New-AzServiceBusNamespace' and 'Set-AzServiceBusNamespace'